start_vms virtual_nodes
check_connection
-# Openstack cluster setup
./salt.sh
-./openstack.sh
-# Enable dpdk on computes
-[[ "$DEPLOY_SCENARIO" =~ (ovs|dpdk) ]] && ./dpdk.sh
+# Openstack cluster setup
+for state in "${cluster_states[@]}"; do
+ echo "STATE: $state"
+ ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} sudo /root/fuel/mcp/config/states/$state
+done
## Disable Fuel deployment engine
#
cluster:
domain: virtual-mcp-ocata-ovs.local
+ states:
+ - openstack
+ - neutron_compute
+ - networks
virtual:
nodes:
- cfg01
cluster:
domain: virtual-mcp-ocata-ovs-dpdk.local
+ states:
+ - dpdk
+ - openstack
+ - neutron_compute
+ - networks
virtual:
nodes:
- cfg01
cluster:
domain: virtual-mcp-ocata-odl.local
+ states:
+ - opendaylight
+ - openstack
+ - networks
virtual:
nodes:
- cfg01
--- /dev/null
+salt -C 'I@nova:compute' system.reboot
+salt -C 'I@nova:compute' test.ping
+
+salt -C 'I@nova:compute' state.sls linux
--- /dev/null
+salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack compute service list; openstack network agent list; openstack stack list; openstack volume list"
+salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack network create --share --external --provider-network-type flat --provider-physical-network physnet1 floating_net"
+salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack subnet create --gateway 10.16.0.1 --no-dhcp --allocation-pool start=10.16.0.130,end=10.16.0.254 --network floating_net --subnet-range 10.16.0.0/24 floating_subnet"
--- /dev/null
+salt -I 'neutron:compute' state.sls neutron
--- /dev/null
+salt -I 'opendaylight:server' state.sls opendaylight
+salt -I 'opendaylight:client' state.sls opendaylight.client
+salt -I 'neutron:server' state.sls opendaylight.client
--- /dev/null
+salt -C 'I@rabbitmq:server' state.sls rabbitmq
+salt -C 'I@rabbitmq:server' cmd.run "rabbitmqctl status"
+
+salt -C 'I@mysql:server' state.sls mysql
+salt -C 'I@memcached:server' state.sls memcached
+
+salt -C 'I@keystone:server' state.sls keystone.server
+salt -C 'I@keystone:server' service.restart apache2
+salt -C 'I@keystone:server' state.sls keystone.client
+salt -C 'I@keystone:server' cmd.run ". /root/keystonercv3; openstack service list"
+
+salt -C 'I@glance:server' state.sls glance
+salt -C 'I@nova:controller' state.sls nova
+salt -C 'I@heat:server' state.sls heat
+salt -C 'I@cinder:controller' state.sls cinder
+
+salt -C 'I@neutron:server' state.sls neutron
+salt -C 'I@neutron:gateway' state.sls neutron
+
+salt -C 'I@nova:compute' state.sls nova
- system.linux.system.repo.mcp.extra
- system.linux.system.repo.saltstack.xenial
- system.nova.compute.single
-- system.neutron.control.opendaylight.single
- service.neutron.compute.single
- cluster.virtual-mcp-ocata-odl
parameters:
ovsdb_server_iface: ptcp:6639:127.0.0.1
ovsdb_odl_iface: tcp:${_param:opendaylight_service_host}:6640
tunnel_ip: ${_param:tenant_address}
- provider_mappings: br-floating:float-to-ex
linux:
- system:
- repo:
- uca:
- source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
- architectures: amd64
- key_id: EC4926EA
- key_server: keyserver.ubuntu.com
network:
bridge: openvswitch
interface:
- system.keystone.client.service.cinder3
- system.glance.control.single
- system.nova.control.single
-- system.neutron.control.openvswitch.single
+- system.neutron.control.opendaylight.single
- system.cinder.control.single
- system.heat.server.single
- service.mysql.server.single
- system.linux.system.repo.mcp.openstack
- system.linux.system.repo.mcp.extra
- system.linux.system.repo.saltstack.xenial
-- system.neutron.control.opendaylight.single
-- service.neutron.gateway.single
+- system.neutron.gateway.opendaylight.single
- cluster.virtual-mcp-ocata-odl
parameters:
_param:
external_interface: ens6
interface_mtu: 9000
linux_system_codename: xenial
+ neutron_agents:
+ - neutron-l3-agent
+ - neutron-dhcp-agent
+ - neutron-metadata-agent
neutron:
gateway:
agent_mode: ${_param:neutron_gateway_agent_mode}
+ pkgs: ${_param:neutron_agents}
+ services: ${_param:neutron_agents}
opendaylight:
client:
ovsdb_server_iface: ptcp:6639:127.0.0.1
tunnel_ip: ${_param:tenant_address}
provider_mappings: br-floating:float-to-ex
linux:
- system:
- repo:
- uca:
- source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
- architectures: amd64
- key_id: EC4926EA
- key_server: keyserver.ubuntu.com
network:
bridge: openvswitch
interface:
keystone_aodh_password: opnfv_secret
aodh_service_host: 172.16.10.108
linux:
+ system:
+ repo:
+ uca:
+ source: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
+ architectures: amd64
+ key_id: EC4926EA
+ key_server: keyserver.ubuntu.com
network:
host:
ctl:
pkg.installed:
- pkgs: {{ client.pkgs }}
+{%- if pillar.linux.network.bridge is defined and pillar.linux.network.bridge == 'openvswitch' %}
ovs_set_manager:
cmd.run:
- name: "ovs-vsctl set-manager {{ client.ovsdb_server_iface }} {{ client.ovsdb_odl_iface }}"
- require:
- cmd: ovs_set_manager
+{%- if client.provider_mappings is defined %}
ovs_set_provider_mapping:
cmd.run:
- name: "ovs-vsctl set Open_vSwitch . other_config:provider_mappings={{ client.provider_mappings }}"
- unless: "ovs-vsctl get Open_vSwitch . other_config | fgrep provider_mappings"
- require:
- cmd: ovs_set_manager
+{%- endif %}
{%- endif %}
+{%- endif %}
+++ /dev/null
-#!/bin/bash
-#
-# Enable DPDK on compute nodes
-#
-
-ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} bash -s << DPDK_INSTALL_END
- sudo -i
-
- salt -C 'I@nova:compute' system.reboot
- salt -C 'I@nova:compute' test.ping
-
- salt -C 'I@nova:compute' state.sls linux
- salt -C 'I@nova:compute' state.sls nova,neutron
-
- salt -C 'I@keystone:server and *01*' cmd.run ". /root/keystonercv3; nova service-list; openstack network agent list"
-DPDK_INSTALL_END
# wait until ssh on Salt master is available
while (($attempt <= $total_attempts)); do
- ssh -i ${SSH_KEY} ubuntu@${SALT_MASTER} uptime
+ ssh -i ${SSH_OPTS} ubuntu@${SALT_MASTER} uptime
case $? in
0) echo "${attempt}> Success"; break ;;
*) echo "${attempt}/${total_attempts}> ssh server ain't ready yet, waiting for ${sleep_time} seconds ..." ;;
+++ /dev/null
-#!/bin/bash
-#
-# Deploy Openstack
-#
-
-ssh ${SSH_OPTS} ubuntu@${SALT_MASTER} bash -s << OPENSTACK_INSTALL_END
- sudo -i
-
- salt-call state.apply salt
- salt '*' state.apply salt || salt '*' state.apply salt
-
- salt -C 'I@salt:master' state.sls linux
- salt -C '* and not cfg01*' state.sls linux
-
- salt '*' state.sls ntp
-
- salt -C 'I@rabbitmq:server' state.sls rabbitmq
- salt -C 'I@rabbitmq:server' cmd.run "rabbitmqctl status"
-
- salt -C 'I@mysql:server' state.sls mysql
-
- salt -C 'I@memcached:server' state.sls memcached
-
- salt -C 'I@keystone:server' state.sls keystone.server
- salt -C 'I@keystone:server' cmd.run "systemctl restart apache2"
- while true; do salt -C 'I@keystone:server' state.sls keystone.client && break; done
- salt -C 'I@keystone:server' cmd.run ". /root/keystonercv3; openstack service list"
-
- salt -C 'I@glance:server' state.sls glance
- salt -C 'I@nova:controller' state.sls nova
- salt -C 'I@heat:server' state.sls heat
- salt -C 'I@cinder:controller' state.sls cinder
-
- salt -C 'I@neutron:server' state.sls neutron
- salt -C 'I@neutron:gateway' state.sls neutron
-
- salt -C 'I@nova:compute' state.sls nova
- salt -C 'I@neutron:compute' state.sls neutron
-
- salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack compute service list; openstack network agent list; openstack stack list; openstack volume list"
-
- salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack network create --share --external --provider-network-type flat --provider-physical-network physnet1 floating_net"
- salt 'ctl01*' cmd.run ". /root/keystonercv3; openstack subnet create --gateway 10.16.0.1 --no-dhcp --allocation-pool start=10.16.0.130,end=10.16.0.254 --network floating_net --subnet-range 10.16.0.0/24 floating_subnet"
-OPENSTACK_INSTALL_END
cd /srv/salt/scripts
MASTER_HOSTNAME=cfg01.${CLUSTER_DOMAIN} DISTRIB_REVISION=nightly ./salt-master-init.sh
salt-key -Ay
+
+ cp -r /root/fuel/mcp/metadata/service /usr/share/salt-formulas/reclass
+ cp -r /root/fuel/mcp/salt-formulas/* /usr/share/salt-formulas/env
+ cd /srv/salt/reclass/classes/service && ln -s /usr/share/salt-formulas/reclass/service/opendaylight
+
+ salt '*' saltutil.refresh_pillar
+ salt '*' saltutil.sync_all
+
+ salt-call state.apply salt
+ salt '*' state.apply salt || salt '*' state.apply salt
+
+ salt -C 'I@salt:master' state.sls linux
+ salt -C '* and not cfg01*' state.sls linux
+
+ salt '*' state.sls ntp
SALT_INSTALL_END