diff options
-rwxr-xr-x | ci/deploy/deploy.sh | 2 | ||||
-rw-r--r-- | deploy/config/vm_environment/zte-virtual2/deploy.yml | 16 | ||||
-rw-r--r-- | deploy/prepare.sh | 10 | ||||
-rw-r--r-- | deploy/prepare/execute.py | 11 | ||||
-rw-r--r-- | deploy/tempest.py | 1 | ||||
-rw-r--r-- | docs/installationprocedure/vmdeploy.rst | 106 |
6 files changed, 86 insertions, 60 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index e99f62e0..596e4aa8 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -301,7 +301,7 @@ touch $WORKSPACE/known_hosts scp $WORKSPACE/known_hosts root@$DAISY_IP:/root/.ssh/ echo "====== add relate config of kolla ======" -ssh $SSH_PARAS $DAISY_IP "bash $REMOTE_SPACE/deploy/prepare.sh -n $NETWORK" +ssh $SSH_PARAS $DAISY_IP "bash $REMOTE_SPACE/deploy/prepare.sh -n $NETWORK -b $IS_BARE" echo "====== prepare cluster and pxe ======" ssh $SSH_PARAS $DAISY_IP "python ${REMOTE_SPACE}/deploy/tempest.py --dha $DHA --network $NETWORK --cluster 'yes'" diff --git a/deploy/config/vm_environment/zte-virtual2/deploy.yml b/deploy/config/vm_environment/zte-virtual2/deploy.yml index 43b2ed03..0202e684 100644 --- a/deploy/config/vm_environment/zte-virtual2/deploy.yml +++ b/deploy/config/vm_environment/zte-virtual2/deploy.yml @@ -4,14 +4,6 @@ hosts: roles:
- 'CONTROLLER_LB'
template: 'templates/virtual_environment/vms/controller.xml'
-- name: 'controller02'
- roles:
- - 'CONTROLLER_LB'
- template: 'templates/virtual_environment/vms/controller.xml'
-- name: 'controller03'
- roles:
- - 'CONTROLLER_LB'
- template: 'templates/virtual_environment/vms/controller.xml'
- name: 'computer01'
roles:
- 'COMPUTER'
@@ -20,6 +12,14 @@ hosts: roles:
- 'COMPUTER'
template: 'templates/virtual_environment/vms/computer.xml'
+- name: 'computer03'
+ roles:
+ - 'COMPUTER'
+ template: 'templates/virtual_environment/vms/computer.xml'
+- name: 'computer04'
+ roles:
+ - 'COMPUTER'
+ template: 'templates/virtual_environment/vms/computer.xml'
disks:
daisy: 50
controller: 110
diff --git a/deploy/prepare.sh b/deploy/prepare.sh index d68a6a44..803d2462 100644 --- a/deploy/prepare.sh +++ b/deploy/prepare.sh @@ -21,7 +21,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx usage: `basename $0` -n network_config_file OPTIONS: - -nw network configuration path, necessary + -n network configuration path, necessary + -b 0 for virtual, 1 for baremetal -h Print this message and exit Description: @@ -35,12 +36,15 @@ EOF NETWORK_CONF='' -while getopts "n:h" OPTION +while getopts "n:b:h" OPTION do case $OPTION in n) NETWORK_CONF=${OPTARG} ;; + b) + IS_BARE=${OPTARG} + ;; h) usage exit 0 @@ -53,4 +57,4 @@ do esac done -python $PYTHONPATH/deploy/prepare/execute.py -nw $NETWORK_CONF +python $PYTHONPATH/deploy/prepare/execute.py -nw $NETWORK_CONF -b $IS_BARE diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py index 67c31b1b..2b46119d 100644 --- a/deploy/prepare/execute.py +++ b/deploy/prepare/execute.py @@ -39,7 +39,7 @@ def _config_service(service, subs): @_config_service('nova', ['compute']) -def _set_default_compute(): +def _set_qemu_compute(): return '[libvirt]\n' \ 'virt_type=qemu\n' \ 'cpu_mode=none\n' @@ -65,8 +65,15 @@ def main(): type=str, required=True, help='network configuration file') + parser.add_argument('-b', '--is-baremetal', + type=str, + required=True, + help='0 for virtual, 1 for baremetal') args = parser.parse_args() - _set_default_compute() + + if args.is_baremetal == '0': + _set_qemu_compute() + _set_default_floating_pool(args.network_file) _set_trusts_auth() diff --git a/deploy/tempest.py b/deploy/tempest.py index 148e8ba3..4f75ee77 100644 --- a/deploy/tempest.py +++ b/deploy/tempest.py @@ -82,6 +82,7 @@ def prepare_install(): elif conf['host'] and conf['host'] == 'yes': print("discover host...") discover_host(hosts_name) + time.sleep(10) print("update hosts interface...") hosts_info = get_hosts() cluster_info = get_cluster() diff --git a/docs/installationprocedure/vmdeploy.rst b/docs/installationprocedure/vmdeploy.rst index 03982342..296af6b9 100644 --- a/docs/installationprocedure/vmdeploy.rst +++ b/docs/installationprocedure/vmdeploy.rst @@ -36,14 +36,13 @@ E.g. OpenStack only deployment roles setting - name: host1 roles: - controller - - ha - name: host2 roles: - compute NOTE: -IF YOU SELECT MUTIPLE NODES AS CONTROLLER, THE 'ha' role MUST BE SELECTED, TOO. +WE JUST SUPPORT ONE CONTROLLER NODE NOW. E.g. OpenStack and ceph deployment roles setting @@ -53,9 +52,6 @@ E.g. OpenStack and ceph deployment roles setting - name: host1 roles: - controller - - ha - - ceph-adm - - ceph-mon - name: host2 roles: @@ -73,51 +69,69 @@ You can write your own reference into it. .. code-block:: console - +--+ - | | - +------------+ | | - | Jumphost +------+ | - +------------+ | | - | | - | | - | | - +------------+ | | - +--------+ Controller +------+ | - | +------------+ | | - | | | - | | | - | | | - | +------------+ | | - | | Compute1 +------+ | - | +------------+ | | - | | | - | | | - | | | - | +------------+ | | - | | Compute2 +------+ | - | +------------+ | | - | | | - | | | - | | | - | | | - | ++-+ - | ^ - | | - | | - ++--------------------------+ | - | External Network | | - +---------------------------+ | - +-----------------------+---+ - | Installation Network | - | Public/Private API | - | Internet Access | - | Tenant Network | - +---------------------------+ + + +------------+------------------------------+ + |Jumperserver+ | + +------------+ +--+ | + | | | | + | +------------+ | | | + | | Daisyserver+------+ | | + | +------------+ | | | + | | | | + | | | | + | | | | + | +------------+ | | | + | +--------+ Controller +------+ | | + | | +------------+ | | | + | | | | | + | | | | | + | | | | | + | | +------------+ | | | + | | | Compute1 +------+ | | + | | +------------+ | | | + | | | | | + | | | | | + | | | | | + | | +------------+ | | | + | | | Compute2 +------+ | | + | | +------------+ | | | + | | | | | + | | | | | + | | | | | + | | | | | + | | ++-+ | + | | ^ | + | | | | + | | | | + | ++--------------------------+ | | + | | | | | + | | External Network | | | + | +---------------------------+ | | + | +-----------------------+---+ | + | | Installation Network | | + | | Public/Private API | | + | | Internet Access | | + | | Tenant Network | | + | +---------------------------+ | + +-------------------------------------------+ + Start Deployment (Virtual Deployment) ------------------------------------- -TODO +(1) Git clone the latest daisy4nfv code from opnfv: "git clone https://gerrit.opnfv.org/gerrit/daisy" + +(2) Download latest bin file(such as opnfv-2017-06-06_23-00-04.bin) of daisy from http://artifacts.opnfv.org/daisy.html and change the bin file name(such as opnfv-2017-06-06_23-00-04.bin) to opnfv.bin + +(3) Make sure the opnfv.bin file is in daisy4nfv code dir + +(4) Create folder of labs/zte/virtual1/daisy/config in daisy4nfv code dir + +(5) Move the daisy/deploy/config/vm_environment/zte-virtual1/deploy.yml and daisy/deploy/config/vm_environment/zte-virtual1/network.yml to labs/zte/virtual1/daisy/config dir. +Notes:zte-virtual1 config file is just for all-in-one deployment,if you want to deploy openstack with five node(1 lb node and 4 computer nodes),change the zte-virtual1 to zte-virtual2 +(6) Run the script deploy.sh in daisy/ci/deploy/ with command: +sudo ./ci/deploy/deploy.sh -b ../daisy -l zte -p virtual1 -B pxebr +(7) When deploy successfully,the floating ip of openstack is 10.20.11.11,the login account is "admin" and the password is "keystone" |