diff --git a/etc/kayobe/ansible/configure-vxlan.yml b/etc/kayobe/ansible/configure-vxlan.yml new file mode 100644 index 000000000..f07933c1b --- /dev/null +++ b/etc/kayobe/ansible/configure-vxlan.yml @@ -0,0 +1,20 @@ +--- +- name: Configure VXLAN + hosts: storage,seed,controllers,compute + gather_facts: false + vars: + ansible_user: "{{ bootstrap_user }}" + # We can't assume that a virtualenv exists at this point, so use the system + # python interpreter. + ansible_python_interpreter: /usr/bin/python3 + # Work around no known_hosts entry on first boot. + ansible_ssh_common_args: "-o StrictHostKeyChecking=no" + roles: + - role: stackhpc.vxlan + vars: + vxlan_phys_dev: "{{ admin_oc_net_name | net_interface }}" + vxlan_dstport: 4790 + vxlan_interfaces: + - device: vxlan10 + group: 224.0.0.10 + bridge: breth1 diff --git a/etc/kayobe/ansible/requirements.yml b/etc/kayobe/ansible/requirements.yml index 99a0c83f7..bd4d27e3f 100644 --- a/etc/kayobe/ansible/requirements.yml +++ b/etc/kayobe/ansible/requirements.yml @@ -4,3 +4,5 @@ collections: version: 1.10.0 - name: stackhpc.pulp version: 0.3.0 +roles: + - src: stackhpc.vxlan diff --git a/etc/kayobe/environments/ci-multinode/README.md b/etc/kayobe/environments/ci-multinode/README.md new file mode 100644 index 000000000..c2511150c --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/README.md @@ -0,0 +1,48 @@ +# Multinode Test Environment + +## Set up hosts +1. Create four baremetal instances with a centos 8 stream LVM image, and a +Centos 8 stream vm +2. SSH into each baremetal and run `sudo chown -R centos:.` in the home directory, + then add the lines + >`10.0.0.34 pelican pelican.service.compute.sms-lab.cloud` + >`10.205.3.187 pulp-server pulp-server.internal.sms-cloud` + + to /etc/hosts (if you're waiting on them starting up, you can progress until + `kayobe overcloud host configure` without this step) + +## Basic Kayobe Setup +1. SSH into the VM +1. `sudo dnf install -y python3-virtualenv` +1. `mkdir src` and `cd src` +1. Clone https://github.com/stackhpc/stackhpc-kayobe-config.git, then checkout + commit f31df6256f1b1fea99c84547d44f06c4cb74b161 +1. `cd ..` and `mkdir venvs` +1. `virtualenv venvs/kayobe` and source `venvs/kayobe/bin/activate` +1. `pip install -U pip` +1. `pip install ./src/kayobe` +1. Acquire the Ansible Vault password for this repository, and store a copy at +``~/vault-pw`` +1. `export KAYOBE_VAULT_PASSWORD=$(cat ~/vault-pw)` + +## Config changes +1. In etc/kayobe/ansible/requirements.yml remove version from vxlan +4. In etc/kayobe/ansible/configure-vxlan.yml, change the group of +vxlan_interfaces so that the last octet is different e.g. 224.0.0.15 +5. Also under vxlan_interfaces, add vni:x where x is between 500 and 1000 +5. Also under vxlan_interfaces, check vxlan_dstport is not 4789 (this causes +conflicts, change to 4790) +6. In /etc/kayobe/environments/ci-multinode/tf-networks.yml, + edit admin_ips so that the compute and controller IPs line up with the + instances that were created earlier, remove the other IPs for seed and + cephOSD +7. In /etc/kayobe/environments/ci-multinode/network-allocation.yml, remove all +the entries and just assign `aio_ips:` an empty set `[]` +8. In etc/kayobe/environments/ci-multinode/inventory/hosts, remove the seed +9. run stackhpc-kayobe-config/etc/kayobe/ansible/growroot.yml (if this fails, +manually increase the partition size on each host) + +## Final steps +1. `source kayobe-env --environment ci-aio` +10. Run `kayobe overcloud host configure` +11. Run `kayobe overcloud service deploy` diff --git a/etc/kayobe/environments/ci-multinode/cephadm.yml b/etc/kayobe/environments/ci-multinode/cephadm.yml new file mode 100644 index 000000000..b4cb2ca0d --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/cephadm.yml @@ -0,0 +1,61 @@ +--- +############################################################################### +# Cephadm deployment configuration. + +# Ceph container image. +cephadm_image: "quay.io/ceph/ceph:v16.2.5" + +# Ceph OSD specification. +cephadm_osd_spec: + service_type: osd + service_id: osd_spec_default + placement: + host_pattern: "*" + data_devices: + all: true + +############################################################################### +# Ceph post-deployment configuration. + +# List of Ceph erasure coding profiles. See stackhpc.cephadm.ec_profiles role +# for format. +cephadm_ec_profiles: [] + +# List of Ceph CRUSH rules. See stackhpc.cephadm.crush_rules role for format. +cephadm_crush_rules: [] + +# List of Ceph pools. See stackhpc.cephadm.pools role for format. +cephadm_pools: + - name: backups + application: rbd + state: present + - name: images + application: rbd + state: present + - name: volumes + application: rbd + state: present + - name: vms + application: rbd + state: present + +# List of Cephx keys. See stackhpc.cephadm.keys role for format. +cephadm_keys: + - name: client.cinder + caps: + mon: "profile rbd" + osd: "profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images" + mgr: "profile rbd pool=volumes, profile rbd pool=vms" + state: present + - name: client.cinder-backup + caps: + mon: "profile rbd" + osd: "profile rbd pool=volumes, profile rbd pool=backups" + mgr: "profile rbd pool=volumes, profile rbd pool=backups" + state: present + - name: client.glance + caps: + mon: "profile rbd" + osd: "profile rbd pool=images" + mgr: "profile rbd pool=images" + state: present diff --git a/etc/kayobe/environments/ci-multinode/compute.yml b/etc/kayobe/environments/ci-multinode/compute.yml new file mode 100644 index 000000000..74e7ef86c --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/compute.yml @@ -0,0 +1,5 @@ +--- +# List of storage volume groups. See mrlesmithjr.manage-lvm role for +# format. +compute_lvm_groups: + - "{{ stackhpc_lvm_group_rootvg }}" diff --git a/etc/kayobe/environments/ci-multinode/controllers.yml b/etc/kayobe/environments/ci-multinode/controllers.yml new file mode 100644 index 000000000..3f612ecd8 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/controllers.yml @@ -0,0 +1,5 @@ +--- +# List of storage volume groups. See mrlesmithjr.manage-lvm role for +# format. +controller_lvm_groups: + - "{{ stackhpc_lvm_group_rootvg }}" diff --git a/etc/kayobe/environments/ci-multinode/globals.yml b/etc/kayobe/environments/ci-multinode/globals.yml new file mode 100644 index 000000000..3a6674de3 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/globals.yml @@ -0,0 +1,63 @@ +--- +# Kayobe global configuration. + +############################################################################### +# Local path configuration (Ansible control host). + +# Path to Kayobe configuration directory on Ansible control host, with an +# environment path appended if kayobe_environment is set. +#kayobe_config_path: + +# Name of Kayobe environment to use. Default is $KAYOBE_ENVIRONMENT, or an +# empty string if $KAYOBE_ENVIRONMENT is not set. Can also be set via the +# --environment argument when invoking kayobe. +#kayobe_environment: + +# Path to Kayobe configuration directory on Ansible control host with an +# environment path appended if kayobe_environment is set. +#kayobe_env_config_path: + +############################################################################### +# Remote path configuration (seed, seed-hypervisor and overcloud hosts). + +# Base path for kayobe state on remote hosts. +#base_path: + +# Path in which to store configuration on remote hosts. +#config_path: + +# Path in which to cache downloaded images on remote hosts. +#image_cache_path: + +# Path on which to checkout source code repositories on remote hosts. +#source_checkout_path: + +# Path on which to create python virtualenvs on remote hosts. +#virtualenv_path: + +############################################################################### +# User configuration. + +# User with which to access remote hosts. This user will be created if it does +# not exist. +#kayobe_ansible_user: + +############################################################################### +# OS distribution. + +# OS distribution name. Valid options are "centos", "ubuntu". Default is +# "centos". +os_distribution: "{{ lookup('pipe', '. /etc/os-release && echo $ID') | trim }}" + +# OS release. Valid options are "8-stream" when os_distribution is "centos", or +# "focal" when os_distribution is "ubuntu". +#os_release: + +############################################################################### + +# Avoid a reboot. +disable_selinux_do_reboot: false + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/compute/network-interfaces b/etc/kayobe/environments/ci-multinode/inventory/group_vars/compute/network-interfaces new file mode 100644 index 000000000..2e94b6c2d --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/compute/network-interfaces @@ -0,0 +1,14 @@ +--- +############################################################################### +# Network interface definitions for the controller group. + +admin_interface: eno1 + +# Controller interface on all-in-one network. +aio_interface: breth1 +# Use dummy1 if it exists, otherwise the bridge will have no ports. +aio_bridge_ports: [] + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/controllers/network-interfaces b/etc/kayobe/environments/ci-multinode/inventory/group_vars/controllers/network-interfaces new file mode 100644 index 000000000..2e94b6c2d --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/controllers/network-interfaces @@ -0,0 +1,14 @@ +--- +############################################################################### +# Network interface definitions for the controller group. + +admin_interface: eno1 + +# Controller interface on all-in-one network. +aio_interface: breth1 +# Use dummy1 if it exists, otherwise the bridge will have no ports. +aio_bridge_ports: [] + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/seed/network-interfaces b/etc/kayobe/environments/ci-multinode/inventory/group_vars/seed/network-interfaces new file mode 100644 index 000000000..13f7aa8ea --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/seed/network-interfaces @@ -0,0 +1,13 @@ +--- +############################################################################### +# Network interface definitions for the controller group. + +admin_interface: eth0 + +# Controller interface on all-in-one network. +aio_interface: breth1 +# Use dummy1 if it exists, otherwise the bridge will have no ports. +aio_bridge_ports: [] +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/lvm b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/lvm new file mode 100644 index 000000000..03b356a9e --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/lvm @@ -0,0 +1,23 @@ +# StackHPC LVM lv_swap LV size. +stackhpc_lvm_lv_swap_size: 1g + +# StackHPC LVM lv_root LV size. +stackhpc_lvm_lv_root_size: 8g + +# StackHPC LVM lv_tmp LV size. +stackhpc_lvm_lv_tmp_size: 2g + +# StackHPC LVM lv_var LV size. +stackhpc_lvm_lv_var_size: 12g + +# StackHPC LVM lv_var_tmp LV size. +stackhpc_lvm_lv_var_tmp_size: 1g + +# StackHPC LVM lv_log LV size. +stackhpc_lvm_lv_log_size: 2g + +# StackHPC LVM lv_audit LV size. +stackhpc_lvm_lv_audit_size: 1g + +# StackHPC LVM lv_home LV size. +stackhpc_lvm_lv_home_size: 2g diff --git a/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces new file mode 100644 index 000000000..35000577f --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/group_vars/storage/network-interfaces @@ -0,0 +1,14 @@ +--- +############################################################################### +# Network interface definitions for the stroage group. + +admin_interface: ens3 + +# Controller interface on all-in-one network. +aio_interface: breth1 +# Use dummy1 if it exists, otherwise the bridge will have no ports. +aio_bridge_ports: [] + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/inventory/groups b/etc/kayobe/environments/ci-multinode/inventory/groups new file mode 100644 index 000000000..43967dac1 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/groups @@ -0,0 +1,5 @@ +[controllers] + +[container-image-builders:children] +# Build container images on the all-in-one controller. +controllers diff --git a/etc/kayobe/environments/ci-multinode/inventory/kayobe-automation b/etc/kayobe/environments/ci-multinode/inventory/kayobe-automation new file mode 100644 index 000000000..5ac95a0d2 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/inventory/kayobe-automation @@ -0,0 +1,2 @@ +[tempest_runner] +kayobe-controller-01 diff --git a/etc/kayobe/environments/ci-multinode/kolla.yml b/etc/kayobe/environments/ci-multinode/kolla.yml new file mode 100644 index 000000000..168500c8b --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/kolla.yml @@ -0,0 +1,3 @@ +--- +kolla_enable_cinder: true +kolla_enable_cinder_backup: true diff --git a/etc/kayobe/environments/ci-multinode/kolla/config/ironic.conf b/etc/kayobe/environments/ci-multinode/kolla/config/ironic.conf new file mode 100644 index 000000000..45f848825 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/kolla/config/ironic.conf @@ -0,0 +1,2 @@ +[DEFAULT] +minimum_required_memory = 256 diff --git a/etc/kayobe/environments/ci-multinode/kolla/globals.yml b/etc/kayobe/environments/ci-multinode/kolla/globals.yml new file mode 100644 index 000000000..e7afedf68 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/kolla/globals.yml @@ -0,0 +1,9 @@ +--- +# Glance Ceph configuration +glance_backend_ceph: "yes" + +# Cinder Ceph configuration +cinder_backend_ceph: "yes" + +# Nova Ceph configuration +nova_backend_ceph: "yes" diff --git a/etc/kayobe/environments/ci-multinode/networks.yml b/etc/kayobe/environments/ci-multinode/networks.yml new file mode 100644 index 000000000..a42719638 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/networks.yml @@ -0,0 +1,119 @@ +--- +# Kayobe network configuration. + +############################################################################### +# Network role to network mappings. + +# Map all networks to the all-in-one network. + +# Name of the network used for admin access to the overcloud +#admin_oc_net_name: +admin_oc_net_name: admin + +# Name of the network used by the seed to manage the bare metal overcloud +# hosts via their out-of-band management controllers. +#oob_oc_net_name: +oob_oc_net_name: aio + +# Name of the network used by the seed to provision the bare metal overcloud +# hosts. +#provision_oc_net_name: +provision_oc_net_name: aio + +# Name of the network used by the overcloud hosts to manage the bare metal +# compute hosts via their out-of-band management controllers. +#oob_wl_net_name: +oob_wl_net_name: aio + +# Name of the network used by the overcloud hosts to provision the bare metal +# workload hosts. +#provision_wl_net_name: +provision_wl_net_name: aio + +# Name of the network used to expose the internal OpenStack API endpoints. +#internal_net_name: +internal_net_name: aio + +# List of names of networks used to provide external network access via +# Neutron. +# Deprecated name: external_net_name +# If external_net_name is defined, external_net_names will default to a list +# containing one item, external_net_name. +#external_net_names: +external_net_names: + - aio + +# Name of the network used to expose the public OpenStack API endpoints. +#public_net_name: +public_net_name: aio + +# Name of the network used by Neutron to carry tenant overlay network traffic. +#tunnel_net_name: +tunnel_net_name: aio + +# Name of the network used to carry storage data traffic. +#storage_net_name: +storage_net_name: aio + +# Name of the network used to carry storage management traffic. +#storage_mgmt_net_name: +storage_mgmt_net_name: aio + +# Name of the network used to carry swift storage data traffic. +#swift_storage_net_name: +swift_storage_net_name: aio + +# Name of the network used to carry swift storage replication traffic. +#swift_storage_replication_net_name: +swift_storage_replication_net_name: aio + +# Name of the network used to perform hardware introspection on the bare metal +# workload hosts. +#inspection_net_name: +inspection_net_name: aio + +# Name of the network used to perform cleaning on the bare metal workload +# hosts +#cleaning_net_name: +cleaning_net_name: aio + +############################################################################### +# Network definitions. + +# All-in-one network. +aio_cidr: 192.168.33.0/24 +aio_allocation_pool_start: 192.168.33.3 +aio_allocation_pool_end: 192.168.33.30 +aio_neutron_allocation_pool_start: 192.168.33.31 +aio_neutron_allocation_pool_end: 192.168.33.127 +aio_inspection_allocation_pool_start: 192.168.33.128 +aio_inspection_allocation_pool_end: 192.168.33.254 +aio_vip_address: 192.168.33.2 + +############################################################################### +# Network virtual patch link configuration. + +# Suffix for Open vSwitch bridge names. +#network_bridge_suffix_ovs: + +# Prefix for virtual patch interface names. +#network_patch_prefix: + +# Suffix for virtual patch link interface names when connected towards the +# physical interface. +#network_patch_suffix_phy: + +# Suffix for virtual patch link interface names when connected towards the +# OVS bridge. +#network_patch_suffix_ovs: + +############################################################################### +# Network routing table configuration. + +# List of IP routing tables. Each item should be a dict containing 'id' and +# 'name' items. These tables will be added to /etc/iproute2/rt_tables. +#network_route_tables: + +############################################################################### +# Dummy variable to allow Ansible to accept this file. +workaround_ansible_issue_8743: yes diff --git a/etc/kayobe/environments/ci-multinode/stackhpc-ci.yml b/etc/kayobe/environments/ci-multinode/stackhpc-ci.yml new file mode 100644 index 000000000..9cfccab43 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/stackhpc-ci.yml @@ -0,0 +1,64 @@ +--- +############################################################################### +# Kolla configuration. + +# Docker namespace to use for Kolla images. Default is 'kolla'. +kolla_docker_namespace: stackhpc-dev + +# Whether docker should be configured to use an insecure registry for Kolla +# # images. Default is false, unless docker_registry_enabled is true and +# # docker_registry_enable_tls is false. +kolla_docker_registry_insecure: "{{ 'https' not in stackhpc_repo_mirror_url }}" + +############################################################################### +# Network configuration. + +# Don't touch resolv.conf: use Neutron DNS for accessing Pulp server via +# hostname. +resolv_is_managed: false + +############################################################################### +# StackHPC configuration. + +# Host and port of a package repository mirror. +# Build and deploy the development Pulp service repositories. +stackhpc_repo_mirror_url: "http://pulp-server.internal.sms-cloud:8080" + +# Build and deploy released Pulp repository versions. +stackhpc_repo_centos_stream_baseos_version: "{{ stackhpc_pulp_repo_centos_stream_8_baseos_version }}" +stackhpc_repo_centos_stream_appstream_version: "{{ stackhpc_pulp_repo_centos_stream_8_appstream_version }}" +stackhpc_repo_centos_stream_extras_version: "{{ stackhpc_pulp_repo_centos_stream_8_extras_version }}" +stackhpc_repo_epel_version: "{{ stackhpc_pulp_repo_epel_version }}" +stackhpc_repo_epel_modular_version: "{{ stackhpc_pulp_repo_epel_modular_version }}" +stackhpc_repo_docker_version: "{{ stackhpc_pulp_repo_docker_version }}" +stackhpc_repo_centos_stream_advanced_virtualization_version: "{{ stackhpc_pulp_repo_centos_stream_8_advanced_virtualization_version }}" +stackhpc_repo_centos_stream_nfv_extras_version: "{{ stackhpc_pulp_repo_centos_stream_8_nfv_extras_version }}" +stackhpc_repo_centos_stream_nfv_openvswitch_version: "{{ stackhpc_pulp_repo_centos_stream_8_nfv_openvswitch_version }}" +stackhpc_repo_centos_stream_openstack_xena_version: "{{ stackhpc_pulp_repo_centos_stream_8_openstack_xena_version }}" +stackhpc_repo_centos_stream_opstools_version: "{{ stackhpc_pulp_repo_centos_stream_8_opstools_version }}" +stackhpc_repo_centos_stream_powertools_version: "{{ stackhpc_pulp_repo_centos_stream_8_powertools_version }}" +stackhpc_repo_centos_stream_storage_ceph_pacific_version: "{{ stackhpc_pulp_repo_centos_stream_8_storage_ceph_pacific_version }}" +stackhpc_repo_elasticsearch_logstash_kibana_7_x_version: "{{ stackhpc_pulp_repo_elasticsearch_logstash_kibana_7_x_version }}" +stackhpc_repo_grafana_version: "{{ stackhpc_pulp_repo_grafana_version }}" +stackhpc_repo_mariadb_10_5_centos8_version: "{{ stackhpc_pulp_repo_mariadb_10_5_centos8_version }}" +stackhpc_repo_rabbitmq_erlang_version: "{{ stackhpc_pulp_repo_rabbitmq_erlang_version }}" +stackhpc_repo_rabbitmq_server_version: "{{ stackhpc_pulp_repo_rabbitmq_server_version }}" +stackhpc_repo_treasuredata_4_version: "{{ stackhpc_pulp_repo_treasuredata_4_version }}" +stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_archive_version }}" +stackhpc_repo_ubuntu_focal_version: "{{ stackhpc_pulp_repo_ubuntu_focal_version }}" +stackhpc_repo_ubuntu_focal_security_version: "{{ stackhpc_pulp_repo_ubuntu_focal_security_version }}" +stackhpc_repo_docker_ce_ubuntu_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_version }}" + +# Host and port of container registry. +# Push built images to the development Pulp service registry. +stackhpc_docker_registry: "{{ stackhpc_repo_mirror_url | regex_replace('^https?://', '') }}" + +# Username and password of container registry. +stackhpc_docker_registry_username: "stackhpc-kayobe-ci" +stackhpc_docker_registry_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 33356166343730633865363431306535613736663764373034396132356131343066636530393534 + 3262646436663034633131316438633230383330633533350a386365313239303464383636376338 + 61656662333939333063343131633963636431663136643137636664633233633133396339613861 + 3038613063626138610a333566393937643630366564653163613364323965396130613433316537 + 39653335393831633362343934363866346262613166393561666336623062393935 diff --git a/etc/kayobe/environments/ci-multinode/storage.yml b/etc/kayobe/environments/ci-multinode/storage.yml new file mode 100644 index 000000000..44b655ce7 --- /dev/null +++ b/etc/kayobe/environments/ci-multinode/storage.yml @@ -0,0 +1,5 @@ +--- +# List of storage volume groups. See mrlesmithjr.manage-lvm role for +# format. +storage_lvm_groups: + - "{{ stackhpc_lvm_group_rootvg }}"