185 lines
6.0 KiB
YAML
185 lines
6.0 KiB
YAML
#
|
|
# Pre-deployment tasks
|
|
#
|
|
|
|
# When the node is not the controller and we need to configure the public
|
|
# address of the node, somehow it fails saying that openvswitch is not
|
|
# installed. By creating the file '/etc/hiera/override/node/${::fqdn}.yaml and
|
|
# setting use_neutron:true on it we force that openvswitch will be installed by
|
|
# the l23network module. that does not mean that we will install neutron there.
|
|
- id: midonet_trick_l23network
|
|
role: [nsdb, compute, midonet-gw]
|
|
stage: pre_deployment/6001
|
|
required_for: [pre_deployment_end]
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-trick-l23network.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 720
|
|
|
|
#
|
|
# Post-deployment tasks
|
|
#
|
|
|
|
# Configure the repositories and the puppet modules we need to deploy
|
|
# midonet on the nodes.
|
|
- id: midonet_install_dependencies
|
|
role: [primary-controller, controller, compute, nsdb, midonet-gw]
|
|
stage: post_deployment/1003
|
|
required_for: [post_deployment_end]
|
|
type: shell
|
|
parameters:
|
|
cmd: ./install_dependencies.sh
|
|
timeout: 720
|
|
|
|
- id: midonet_install_repositories
|
|
role: [primary-controller, controller, compute, nsdb, midonet-gw]
|
|
stage: post_deployment/1004
|
|
required_for: [post_deployment_end]
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-define-repositories.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 720
|
|
|
|
# Enable IP forward in all the nodes that will install midolman agent
|
|
- id: midonet_enable_ip_forward
|
|
role: [nsdb, compute, controller, primary-controller]
|
|
stage: post_deployment/4400
|
|
required_for: [post_deployment_end]
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-enable-ip-forward.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 720
|
|
|
|
# This task will install and configure the `nsdb` role (with zookeeper
|
|
# and cassandra)
|
|
- id: midonet_cassandra_and_zookeeper
|
|
role: [nsdb]
|
|
stage: post_deployment/6001
|
|
required_for: [deploy_end]
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-nsdb.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 720
|
|
|
|
# Only running on primary controller: since we can only set tasks on
|
|
# post-deployments, reaching this point means Neutron is deployed with
|
|
# ML2 plugin (the default one). This script cleans the networks created
|
|
# by the regular deployment.
|
|
- id: midonet_clean_neutron_db
|
|
role: [primary-controller]
|
|
stage: post_deployment/6400
|
|
type: shell
|
|
parameters:
|
|
cmd: ./clean_neutron.sh
|
|
timeout: 720
|
|
fail_on_error: false
|
|
|
|
# Disable all the Neutron services: neutorn-server, l3-agent, dhcp-agent
|
|
# metadata-agent
|
|
- id: midonet_disable_services
|
|
role: [primary-controller, controller]
|
|
stage: post_deployment/6405
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-disable-services.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# Deploy the midonet api in the controllers
|
|
- id: midonet_deploy_api
|
|
role: [primary-controller, controller]
|
|
stage: post_deployment/6410
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-install-api.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules/
|
|
timeout: 1440
|
|
|
|
# Install, configure and run MidoNet agent and remove any other
|
|
# openvswitch package which is not the Kernel module
|
|
- id: midonet_agent
|
|
role: [primary-controller, controller, compute, midonet-gw]
|
|
stage: post_deployment/6415
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-install-agent.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 1440
|
|
|
|
# During deployment, openvswitch has created a datapath called `ovs-services`.
|
|
# Stop MidoNet agent, and clean the datapath, and run MidoNet agent again
|
|
- id: midonet_delete_datapaths
|
|
role: [primary-controller, controller, compute, midonet-gw]
|
|
stage: post_deployment/6420
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-delete-datapaths.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# Install nova-rootwrap network filters
|
|
- id: midonet_nova_network
|
|
role: [compute]
|
|
stage: post_deployment/6421
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-install-nova-network.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# Register any host that runs MidoNet agent to the default tunnelzone
|
|
- id: midonet_host_registry
|
|
role: [primary-controller, controller, compute, midonet-gw]
|
|
stage: post_deployment/6425
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-host-registry.pp
|
|
puppet_modules: "puppet/modules/:/etc/puppet/modules/"
|
|
timeout: 720
|
|
|
|
# Reconfigure neturon files to run with MidoNet plugin
|
|
- id: midonet_reconfigure_neutron
|
|
role: [primary-controller, controller]
|
|
stage: post_deployment/6430
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-reconfigure-neutron.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# Clean and run Neutron database. That may help if someday we need a MidoNet
|
|
# specific database table
|
|
- id: midonet_recreate_neutron_db
|
|
role: [primary-controller]
|
|
stage: post_deployment/6435
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-recreate-neutron-db.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# Recreate the default networks on Neutron database and restart Neutron
|
|
# services
|
|
- id: midonet_restart_neutron
|
|
role: [primary-controller, controller]
|
|
stage: post_deployment/6440
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-restart-neutron.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|
|
|
|
# In Gateway node: register the node as the gateway of the deployment
|
|
- id: midonet_configure_gateway
|
|
role: [midonet-gw]
|
|
stage: post_deployment/6500
|
|
type: puppet
|
|
parameters:
|
|
puppet_manifest: puppet/manifests/midonet-gateway-bgp.pp
|
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
timeout: 720
|