diff --git a/doc/source/_static/scripts/envs/openstack_cluster.env.example b/doc/source/_static/scripts/envs/openstack_cluster.env.example new file mode 100644 index 0000000..e0baa56 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_cluster.env.example @@ -0,0 +1,20 @@ +parameters: + public_net_id: name of external network + instance_image: image for OpenStack instances, must correspond with os_distribution + config_image: image for Salt master node, currently only Ubuntu 14.04 supported + key_value: paste your SSH key here + salt_source: salt-master installation source, options: pkg/pip, default: pkg + salt_version: salt-master version, options: latest/specific, default: latest + formula_source: salt formulas source, options: git/pkg, default: git + formula_path: path to formulas, default: /usr/share/salt-formulas + formula_branch: formulas git branch, default: master + reclass_address: reclass git repository, default: https://github.com/tcpcloud/openstack-salt-model.git + reclass_branch: reclass git branch, default: master + os_version: OpenStack release version, options: kilo, default: kilo + os_distribution: OpenStack nodes distribution, options: ubuntu, redhat, debian, default: ubuntu + os_networking: OpenStack networking engine, options: opencontrail, neutron, default: opencontrail + os_deployment: OpenStack architecture, options: single/cluster, default: single + config_hostname: salt-master hostname, default: config + config_domain: salt-master domain, default: openstack.local + config_address: salt-master internal IP address, default: 10.10.10.200 + diff --git a/doc/source/_static/scripts/envs/openstack_cluster_kilo_redhat_opencontrail.env.example b/doc/source/_static/scripts/envs/openstack_cluster_kilo_redhat_opencontrail.env.example new file mode 100644 index 0000000..8c5efa2 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_cluster_kilo_redhat_opencontrail.env.example @@ -0,0 +1,7 @@ +parameters: + public_net_id: ext-net + instance_image: CentOS-7-x86_64-GenericCloud + config_image: trusty-server-cloudimg-amd64 + key_value: public part of your SSH key + os_distribution: redhat + diff --git a/doc/source/_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example b/doc/source/_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example new file mode 100644 index 0000000..7117657 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example @@ -0,0 +1,6 @@ +parameters: + public_net_id: ext-net + instance_image: trusty-server-cloudimg-amd64 + config_image: trusty-server-cloudimg-amd64 + key_value: public part of your SSH key + diff --git a/doc/source/_static/scripts/envs/openstack_single.env.example b/doc/source/_static/scripts/envs/openstack_single.env.example new file mode 100644 index 0000000..e0baa56 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_single.env.example @@ -0,0 +1,20 @@ +parameters: + public_net_id: name of external network + instance_image: image for OpenStack instances, must correspond with os_distribution + config_image: image for Salt master node, currently only Ubuntu 14.04 supported + key_value: paste your SSH key here + salt_source: salt-master installation source, options: pkg/pip, default: pkg + salt_version: salt-master version, options: latest/specific, default: latest + formula_source: salt formulas source, options: git/pkg, default: git + formula_path: path to formulas, default: /usr/share/salt-formulas + formula_branch: formulas git branch, default: master + reclass_address: reclass git repository, default: https://github.com/tcpcloud/openstack-salt-model.git + reclass_branch: reclass git branch, default: master + os_version: OpenStack release version, options: kilo, default: kilo + os_distribution: OpenStack nodes distribution, options: ubuntu, redhat, debian, default: ubuntu + os_networking: OpenStack networking engine, options: opencontrail, neutron, default: opencontrail + os_deployment: OpenStack architecture, options: single/cluster, default: single + config_hostname: salt-master hostname, default: config + config_domain: salt-master domain, default: openstack.local + config_address: salt-master internal IP address, default: 10.10.10.200 + diff --git a/doc/source/_static/scripts/envs/openstack_single_kilo_redhat_opencontrail.env.example b/doc/source/_static/scripts/envs/openstack_single_kilo_redhat_opencontrail.env.example new file mode 100644 index 0000000..8c5efa2 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_single_kilo_redhat_opencontrail.env.example @@ -0,0 +1,7 @@ +parameters: + public_net_id: ext-net + instance_image: CentOS-7-x86_64-GenericCloud + config_image: trusty-server-cloudimg-amd64 + key_value: public part of your SSH key + os_distribution: redhat + diff --git a/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_neutron.env.example b/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_neutron.env.example new file mode 100644 index 0000000..84c310d --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_neutron.env.example @@ -0,0 +1,7 @@ +parameters: + public_net_id: ext-net + instance_image: trusty-server-cloudimg-amd64 + config_image: trusty-server-cloudimg-amd64 + key_value: public part of your SSH key + os_networking: neutron + diff --git a/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_opencontrail.env.example b/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_opencontrail.env.example new file mode 100644 index 0000000..7117657 --- /dev/null +++ b/doc/source/_static/scripts/envs/openstack_single_kilo_ubuntu_opencontrail.env.example @@ -0,0 +1,6 @@ +parameters: + public_net_id: ext-net + instance_image: trusty-server-cloudimg-amd64 + config_image: trusty-server-cloudimg-amd64 + key_value: public part of your SSH key + diff --git a/doc/source/_static/scripts/openstack_cluster.hot b/doc/source/_static/scripts/openstack_cluster.hot new file mode 100644 index 0000000..d2b7bca --- /dev/null +++ b/doc/source/_static/scripts/openstack_cluster.hot @@ -0,0 +1,463 @@ +heat_template_version: 2013-05-23 +description: Base Heat stack with simple OS setup +parameters: + key_name: + type: string + default: openstack_salt_key + key_value: + type: string + salt_source: + type: string + default: pkg + salt_version: + type: string + default: latest + formula_source: + type: string + default: git + formula_path: + type: string + default: /usr/share/salt-formulas + formula_branch: + type: string + default: master + reclass_address: + type: string + default: https://github.com/tcpcloud/openstack-salt-model.git + reclass_branch: + type: string + default: master + os_version: + type: string + default: kilo + os_distribution: + type: string + default: ubuntu + os_networking: + type: string + default: opencontrail + os_deployment: + type: string + default: single + config_hostname: + type: string + default: config + config_domain: + type: string + default: openstack-ha.local + config_address: + type: string + default: 10.10.10.200 + ctl01_name: + type: string + default: control01 + ctl02_name: + type: string + default: control02 + ctl03_name: + type: string + default: control03 + cmp01_name: + type: string + default: compute01 + cmp02_name: + type: string + default: compute02 + prx01_name: + type: string + default: proxy + cluster_vip_address: + type: string + default: 10.10.10.254 + instance_flavor: + type: string + description: Instance type for servers + default: m1.small + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + config_image: + type: string + description: Image name to use for Salt master. + default: ubuntu-14-04-x64-1452267252 + instance_image: + type: string + description: Image name to use for the servers. + default: ubuntu-14-04-x64-1452267252 + public_net_id: + type: string + description: ID or name of public network for which floating IP addresses will be allocated + router_name: + type: string + description: Name of router to be created + default: openstack-salt-router + private_net_name: + type: string + description: Name of private network to be created + default: openstack-salt-net + private_net_cidr: + type: string + description: Private network address (CIDR notation) + default: 10.10.10.0/24 + instance_flavor_controller: + type: string + description: Instance type for controllers + default: m1.large + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + instance_flavor_compute: + type: string + description: Instance type for compute nodes + default: m1.medium + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + instance_flavor_support: + type: string + description: Instance type for support nodes (web, monitoring, etc.) + default: m1.small + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type +resources: + keypair: + type: OS::Nova::KeyPair + properties: + name: { get_param: key_name } + public_key: { get_param: key_value } + save_private_key: false + private_net: + type: OS::Neutron::Net + properties: + name: { get_param: private_net_name } + private_subnet: + type: OS::Neutron::Subnet + properties: + name: { get_param: private_net_name } + network_id: { get_resource: private_net } + cidr: { get_param: private_net_cidr } + router: + type: OS::Neutron::Router + properties: + name: { get_param: router_name } + external_gateway_info: + network: { get_param: public_net_id } + router_interface: + type: OS::Neutron::RouterInterface + properties: + router_id: { get_resource: router } + subnet_id: { get_resource: private_subnet } + security_group: + type: OS::Neutron::SecurityGroup + properties: + name: { get_param: router_name } + rules: + - protocol: tcp + remote_ip_prefix: 0.0.0.0/0 + - protocol: icmp + remote_ip_prefix: 0.0.0.0/0 + cfg01_floating_ip: + type: OS::Nova::FloatingIP + properties: + pool: { get_param: public_net_id } + cfg01_floating_ip_association: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: cfg01_floating_ip } + server_id: { get_resource: cfg01_instance } + cfg01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.200 + security_groups: + - default + - { get_resource: security_group } + cfg01_instance: + type: OS::Nova::Server + properties: + image: { get_param: config_image } + flavor: { get_param: instance_flavor } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: config_hostname }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: cfg01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export FORMULA_SOURCE=$FORMULA_SOURCE + export FORMULA_PATH=$FORMULA_PATH + export FORMULA_BRANCH=$FORMULA_BRANCH + export RECLASS_ADDRESS=$RECLASS_ADDRESS + export RECLASS_BRANCH=$RECLASS_BRANCH + export RECLASS_SYSTEM=$RECLASS_SYSTEM + export CONFIG_HOSTNAME=$CONFIG_HOSTNAME + export CONFIG_DOMAIN=$CONFIG_DOMAIN + export CONFIG_HOST=$CONFIG_HOST + export CONFIG_ADDRESS=$CONFIG_ADDRESS + + BOOTSTRAP + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $FORMULA_SOURCE: { get_param: formula_source } + $FORMULA_PATH: { get_param: formula_path } + $FORMULA_BRANCH: { get_param: formula_branch } + $RECLASS_ADDRESS: { get_param: reclass_address } + $RECLASS_BRANCH: { get_param: reclass_branch } + $RECLASS_SYSTEM: { list_join: [ '_', [ { get_param: os_version }, { get_param: os_distribution }, { get_param: os_networking }, { get_param: os_deployment } ]] } + $CONFIG_HOSTNAME: { get_param: config_hostname } + $CONFIG_DOMAIN: { get_param: config_domain } + $CONFIG_HOST: { list_join: [ '.', [ { get_param: config_hostname }, { get_param: config_domain } ]] } + $CONFIG_ADDRESS: { get_param: config_address } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-master.sh } + ctl01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.201 + allowed_address_pairs: + - ip_address: { get_param: cluster_vip_address } + security_groups: + - default + - { get_resource: security_group } + ctl01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_controller } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: ctl01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: ctl01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: ctl01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: ctl01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + ctl02_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.202 + allowed_address_pairs: + - ip_address: { get_param: cluster_vip_address } + security_groups: + - default + - { get_resource: security_group } + ctl02_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_controller } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: ctl02_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: ctl02_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: ctl02_name } + $MINION_ID: { list_join: [ '.', [ { get_param: ctl02_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + ctl03_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.203 + allowed_address_pairs: + - ip_address: { get_param: cluster_vip_address } + security_groups: + - default + - { get_resource: security_group } + ctl03_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_controller } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: ctl03_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: ctl03_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: ctl03_name } + $MINION_ID: { list_join: [ '.', [ { get_param: ctl03_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + cmp01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.211 + security_groups: + - default + - { get_resource: security_group } + cmp01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_compute } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: cmp01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: cmp01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: cmp01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: cmp01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + cmp02_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.212 + security_groups: + - default + - { get_resource: security_group } + cmp02_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_compute } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: cmp02_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: cmp02_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: cmp02_name } + $MINION_ID: { list_join: [ '.', [ { get_param: cmp02_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + prx01_floating_ip: + type: OS::Nova::FloatingIP + properties: + pool: { get_param: public_net_id } + prx01_floating_ip_association: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: prx01_floating_ip } + server_id: { get_resource: prx01_instance } + prx01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.204 + security_groups: + - default + - { get_resource: security_group } + prx01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_support } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: prx01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: prx01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: prx01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: prx01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } diff --git a/doc/source/_static/scripts/openstack_single.hot b/doc/source/_static/scripts/openstack_single.hot new file mode 100644 index 0000000..9c969b7 --- /dev/null +++ b/doc/source/_static/scripts/openstack_single.hot @@ -0,0 +1,331 @@ +heat_template_version: 2013-05-23 +description: Base Heat stack with simple OS setup +parameters: + key_name: + type: string + default: openstack_salt_key + key_value: + type: string + salt_source: + type: string + default: pkg + salt_version: + type: string + default: latest + formula_source: + type: string + default: git + formula_path: + type: string + default: /usr/share/salt-formulas + formula_branch: + type: string + default: master + reclass_address: + type: string + default: https://github.com/tcpcloud/openstack-salt-model.git + reclass_branch: + type: string + default: master + os_version: + type: string + default: kilo + os_distribution: + type: string + default: ubuntu + os_networking: + type: string + default: opencontrail + os_deployment: + type: string + default: single + config_hostname: + type: string + default: config + config_domain: + type: string + default: openstack.local + config_address: + type: string + default: 10.10.10.200 + ctl01_name: + type: string + default: control + cmp01_name: + type: string + default: compute + prx01_name: + type: string + default: proxy + instance_flavor: + type: string + description: Instance type for servers + default: m1.small + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + config_image: + type: string + description: Image name to use for Salt master. + default: ubuntu-14-04-x64-1452267252 + instance_image: + type: string + description: Image name to use for the servers. + default: ubuntu-14-04-x64-1452267252 + public_net_id: + type: string + description: ID or name of public network for which floating IP addresses will be allocated + router_name: + type: string + description: Name of router to be created + default: openstack-salt-router + private_net_name: + type: string + description: Name of private network to be created + default: openstack-salt-net + private_net_cidr: + type: string + description: Private network address (CIDR notation) + default: 10.10.10.0/24 + instance_flavor_controller: + type: string + description: Instance type for controllers + default: m1.large + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + instance_flavor_compute: + type: string + description: Instance type for compute nodes + default: m1.medium + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type + instance_flavor_support: + type: string + description: Instance type for support nodes (web, monitoring, etc.) + default: m1.small + constraints: + - allowed_values: [m1.tiny, m1.small, m1.medium, m1.large] + description: instance_type must be a valid instance type +resources: + keypair: + type: OS::Nova::KeyPair + properties: + name: { get_param: key_name } + public_key: { get_param: key_value } + save_private_key: false + private_net: + type: OS::Neutron::Net + properties: + name: { get_param: private_net_name } + private_subnet: + type: OS::Neutron::Subnet + properties: + name: { get_param: private_net_name } + network_id: { get_resource: private_net } + cidr: { get_param: private_net_cidr } + router: + type: OS::Neutron::Router + properties: + name: { get_param: router_name } + external_gateway_info: + network: { get_param: public_net_id } + router_interface: + type: OS::Neutron::RouterInterface + properties: + router_id: { get_resource: router } + subnet_id: { get_resource: private_subnet } + security_group: + type: OS::Neutron::SecurityGroup + properties: + name: { get_param: router_name } + rules: + - protocol: tcp + remote_ip_prefix: 0.0.0.0/0 + - protocol: icmp + remote_ip_prefix: 0.0.0.0/0 + cfg01_floating_ip: + type: OS::Nova::FloatingIP + properties: + pool: { get_param: public_net_id } + cfg01_floating_ip_association: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: cfg01_floating_ip } + server_id: { get_resource: cfg01_instance } + cfg01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.200 + security_groups: + - default + - { get_resource: security_group } + cfg01_instance: + type: OS::Nova::Server + properties: + image: { get_param: config_image } + flavor: { get_param: instance_flavor } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: config_hostname }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: cfg01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export FORMULA_SOURCE=$FORMULA_SOURCE + export FORMULA_PATH=$FORMULA_PATH + export FORMULA_BRANCH=$FORMULA_BRANCH + export RECLASS_ADDRESS=$RECLASS_ADDRESS + export RECLASS_BRANCH=$RECLASS_BRANCH + export RECLASS_SYSTEM=$RECLASS_SYSTEM + export CONFIG_HOSTNAME=$CONFIG_HOSTNAME + export CONFIG_DOMAIN=$CONFIG_DOMAIN + export CONFIG_HOST=$CONFIG_HOST + export CONFIG_ADDRESS=$CONFIG_ADDRESS + + BOOTSTRAP + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $FORMULA_SOURCE: { get_param: formula_source } + $FORMULA_PATH: { get_param: formula_path } + $FORMULA_BRANCH: { get_param: formula_branch } + $RECLASS_ADDRESS: { get_param: reclass_address } + $RECLASS_BRANCH: { get_param: reclass_branch } + $RECLASS_SYSTEM: { list_join: [ '_', [ { get_param: os_version }, { get_param: os_distribution }, { get_param: os_networking }, { get_param: os_deployment } ]] } + $CONFIG_HOSTNAME: { get_param: config_hostname } + $CONFIG_DOMAIN: { get_param: config_domain } + $CONFIG_HOST: { list_join: [ '.', [ { get_param: config_hostname }, { get_param: config_domain } ]] } + $CONFIG_ADDRESS: { get_param: config_address } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-master.sh } + ctl01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.201 + security_groups: + - default + - { get_resource: security_group } + ctl01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_controller } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: ctl01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: ctl01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: ctl01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: ctl01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + cmp01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.202 + security_groups: + - default + - { get_resource: security_group } + cmp01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_compute } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: cmp01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: cmp01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: cmp01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: cmp01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } + prx01_floating_ip: + type: OS::Nova::FloatingIP + properties: + pool: { get_param: public_net_id } + prx01_floating_ip_association: + type: OS::Nova::FloatingIPAssociation + properties: + floating_ip: { get_resource: prx01_floating_ip } + server_id: { get_resource: prx01_instance } + prx01_port: + type: OS::Neutron::Port + properties: + network_id: { get_resource: private_net } + fixed_ips: + - ip_address: 10.10.10.203 + security_groups: + - default + - { get_resource: security_group } + prx01_instance: + type: OS::Nova::Server + properties: + image: { get_param: instance_image } + flavor: { get_param: instance_flavor_support } + key_name: { get_resource: keypair } + name: { list_join: [ '.', [ { get_param: prx01_name }, { get_param: config_domain } ]] } + networks: + - port: { get_resource: prx01_port } + user_data_format: RAW + user_data: + str_replace: + template: | + #!/bin/bash + export SALT_SOURCE=$SALT_SOURCE + export SALT_VERSION=$SALT_VERSION + export MINION_MASTER=$MINION_MASTER + export MINION_HOSTNAME=$MINION_HOSTNAME + export MINION_ID=$MINION_ID + + BOOTSTRAP + + params: + $SALT_SOURCE: { get_param: salt_source } + $SALT_VERSION: { get_param: salt_version } + $MINION_MASTER: { get_param: config_address } + $MINION_HOSTNAME: { get_param: prx01_name } + $MINION_ID: { list_join: [ '.', [ { get_param: prx01_name }, { get_param: config_domain } ]] } + BOOTSTRAP: { get_file: bootstrap/bootstrap-salt-minion.sh } diff --git a/doc/source/develop/quickstart-heat.rst b/doc/source/develop/quickstart-heat.rst index 6588860..a6d67e2 100644 --- a/doc/source/develop/quickstart-heat.rst +++ b/doc/source/develop/quickstart-heat.rst @@ -23,29 +23,12 @@ The single-node deployment has following requirements: Available Heat templates ------------------------ -The `OpenStack-Salt heat templates repository`_ contains several repositories to help installing cloud deployments in OpenStack. We have prepared several basic deployment setups, summarised in the table below: - -.. list-table:: - :stub-columns: 1 - - * - **HOT template** - - **Description** - - **Status** - * - openstack_salt_ubuntu_cluster - - HA Cluster OpenStack deployment on Ubuntu - - Stable - * - openstack_salt_ubuntu_single - - Single-node OpenStack deployment on Ubuntu - - Testing - * - openstack_salt_redhat_single - - Single-node OpenStack deployment on RedHat - - Experimental - +We have prepared two generic OpenStack Salt lab templates, OpenStack in single and OpenStack in cluster configuration. Both are deployed by custom parametrized bootstrap script, which sets up Salt master with OpenStack Salt formula ecosystem and example metadata. Openstack-salt single setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``openstack_salt_ubuntu_single`` environment consists of three nodes. +The ``openstack_single`` environment consists of three nodes. .. list-table:: :stub-columns: 1 @@ -67,7 +50,7 @@ The ``openstack_salt_ubuntu_single`` environment consists of three nodes. Openstack-salt cluster setup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The ``openstack_salt_ubuntu_cluster`` environment consists of six nodes. +The ``openstack_cluster`` environment consists of six nodes. .. list-table:: :stub-columns: 1 @@ -170,7 +153,7 @@ Some resources required for heat environment deployment. Get network ID ~~~~~~~~~~~~~~ -The public network is needed for setting up the ``salt_single`` heat stack. For further stacks, the salt_single network is needed. The network ID can be found in Openstack Dashboard or by running following command: +The public network is needed for setting up both testing heat stacks. The network ID can be found in Openstack Dashboard or by running following command: .. code-block:: bash @@ -181,7 +164,7 @@ The public network is needed for setting up the ``salt_single`` heat stack. For Get image ID ~~~~~~~~~~~~ -Ubuntu 14.04 LTS image is needed for OpenStack-Salt deployments, we recommend to download the latest `tcp cloud image`_. To lookup for actual installed images run: +Image ID is required to run OpenStack Salt lab templates, Ubuntu 14.04 LTS is required as config_image and image for one of the supported platforms is required as instance_image, used for OpenStack instances. To lookup for actual installed images run: .. code-block:: bash @@ -191,30 +174,257 @@ Ubuntu 14.04 LTS image is needed for OpenStack-Salt deployments, we recommend to Launching the Heat stack ------------------------ -Download heat templates from `OpenStack-Salt heat templates repository`_. +Download heat templates from this repository. .. code-block:: bash - $ git clone https://github.com/tcpcloud/heat-templates.git + $ git clone git@github.com:openstack/openstack-salt.git + $ cd doc/source/_static/scripts/ +Now you need to customize env files for stacks, see examples in envs directory ``doc/source/_static/scripts/envs`` and set required parameters. -Now you need to customize env files for stacks, see examples in env directory -and set required parameters. +Full examples of env files for the two respective stacks: +OpenStack templates generic parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``env/tcp_cloud.env``: - .. code-block:: yaml +**public_net_id** + name of external network - parameters: - instance_image: - public_net_id: - key_value: +**instance_image** + image for OpenStack instances, must correspond with os_distribution -To see all available parameters, see template yaml files in `templates` directory. Finally you can deploy stack with Salt master and OpenStack cloud, your SSH key and private network. +**config_image** + image for Salt master node, currently only Ubuntu 14.04 supported + +**key_value** + paste your SSH key here + +**salt_source** + salt-master installation source + + options: + - pkg + - pip + + default: + - pkg + +**salt_version** + salt-master version + + options: + - latest + - 2015.8.11 + - 2015.8.10 + - 2015.8.9 + - ... + + default: + - latest + +**formula_source** + salt formulas source + + options: + - git + - pkg + + default: + - git + +**formula_path** + path to formulas + + default: + - /usr/share/salt-formulas + +**formula_branch** + formulas git branch + + default: + - master + +**reclass_address** + reclass git repository + + default: + - https://github.com/tcpcloud/openstack-salt-model.git + +**reclass_branch** + reclass git branch + + default: + - master + +**os_version** + OpenStack release version + + options: + - kilo + + default: + - kilo + +**os_distribution** + OpenStack nodes distribution + + options: + - ubuntu + - redhat + + default: + - ubuntu + +**os_networking** + OpenStack networking engine + + options: + - opencontrail + - neutron + + default: + - opencontrail + +**os_deployment** + OpenStack architecture + + options: + - single + - cluster + + default: + - single + +**config_hostname** + salt-master hostname + + default: + - config + +**config_address** + salt-master internal IP address + + default: + - 10.10.10.200 + +OpenStack single specific parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**config_domain** + salt-master domain + + default: + - openstack.local + +**ctl01_name** + OS controller hostname + + default: + - control + +**cmp01_name** + OS compute hostname + + default: + - compute + +**prx01_name** + OS proxy hostname + + default: + - proxy + +OpenStack cluster specific parameters +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**config_domain** + salt-master domain + + default: + - openstack-ha.local + +**ctl01_name** + OS controller 1 hostname + + default: + - control01 + +**ctl02_name** + OS controller 2 hostname + + default: + - control02 + +**ctl03_name** + OS controller 3 hostname + + default: + - control03 + +**cmp01_name** + OS compute 1 hostname + + default: + - compute01 + +**cmp02_name** + OS compute 2 hostname + + default: + - compute02 + +**prx01_name** + OS proxy hostname + + default: + - proxy + +openstack_single.hot environment examples +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**OpenStack Kilo on Ubuntu with OpenContrail networking** + +``/_static/scripts/envs/openstack_single_kilo_ubuntu_opencontrail.env.example`` + +.. literalinclude:: /_static/scripts/envs/openstack_single_kilo_ubuntu_opencontrail.env.example + :language: yaml + +**OpenStack Kilo on Ubuntu with Neutron DVR networking** + +``/_static/scripts/envs/openstack_single_kilo_ubuntu_neutron.env.example`` + +.. literalinclude:: /_static/scripts/envs/openstack_single_kilo_ubuntu_neutron.env.example + :language: yaml + +**OpenStack Kilo on CentOS/RHEL with OpenContrail networking** + +``/_static/scripts/envs/openstack_single_kilo_redhat_opencontrail.env.example`` + +.. literalinclude:: /_static/scripts/envs/openstack_single_kilo_redhat_opencontrail.env.example + :language: yaml + +openstack_cluster.hot environment examples +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**OpenStack Kilo on Ubuntu with OpenContrail networking** + +``/_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example`` + +.. literalinclude:: /_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example + :language: yaml + +**OpenStack Kilo on CentOS/RHEL with OpenContrail networking** + +``/_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example`` + +.. literalinclude:: /_static/scripts/envs/openstack_cluster_kilo_ubuntu_opencontrail.env.example + :language: yaml .. code-block:: bash - $ ./create_stack.sh openstack_salt_ubuntu_single tcp_cloud + $ heat stack-create -e envs/ENV_FILE -f openstack_single.hot + $ heat stack-create -e envs/ENV_FILE -f openstack_cluster.hot If everything goes right, stack should be ready in a few minutes. You can verify by running following commands: @@ -225,10 +435,41 @@ If everything goes right, stack should be ready in a few minutes. You can verify You should be also able to log in as root to public IP provided by ``nova list`` command. When this cluster is deployed, you canlog in to the instances through the Salt master node. -.. _Heat template: https://github.com/tcpcloud/heat-templates -.. _OpenStack-Salt heat templates repository: https://github.com/tcpcloud/heat-templates -.. _tcp cloud image: http://apt.tcpcloud.eu/images/ +Current state of supported env configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. list-table:: + :stub-columns: 1 + + * - **ENV configuration** + - **Single Status** + - **Cluster Status** + * - OS Kilo Ubuntu with OpenContrail + - Stable + - Stable + * - OS Kilo RedHat single with OpenContrail + - Experimental + - Experimental + * - OS Kilo Ubuntu single with Neutron DVR + - Experimental + - NONE + +OpenStack Heat templates +~~~~~~~~~~~~~~~~~~~~~~~~ + +**OpenStack single Heat template** + +``/_static/scripts/openstack_single.hot`` + +.. literalinclude:: /_static/scripts/openstack_single.hot + :language: yaml + +**OpenStack cluster Heat template** + +``/_static/scripts/openstack_cluster.hot`` + +.. literalinclude:: /_static/scripts/openstack_cluster.hot + :language: yaml Openstack-salt testing labs ---------------------------