Skip to content

Commit

Permalink
Multi-cell adoption
Browse files Browse the repository at this point in the history
Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Jul 2, 2024
1 parent 551c9d9 commit 0b11b12
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
73 changes: 73 additions & 0 deletions docs_dev/assemblies/development_environment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,79 @@ https://openstack-k8s-operators.github.io/data-plane-adoption/dev/#_reset_the_en

'''

== Deploying TripleO With Multiple Cells

A TripleO Standalone setup creates only a single Nova v2 cell, with a combined controller and compute services on it.
In order to deploy multiple compute cells for adoption testing (without Ceph), create a 5 VMs, with the following requirements met:

* Named `edpm-compute-0` .. `edpm-compute-4`.
* Running RHEL 9.2, with RHOSP 17.1 repositiries configured.
* Can login via SSH without a password as the root user, from the hypervisor host.
* User `zuul` is created, and can sudo without a password, and login via SSH without a password, from the hypervisor host.
* User `zuul` can login to `edpm-compute-1`, `edpm-compute-2`, `edpm-compute-3`, `edpm-compute-4` nodes via SSH without a password, from the `edpm-compute-0` node,
by using the generated `/home/zuul/.ssh/id_rsa` private key.
* RedHat registry credentials are exported on the hypervisor host.

Then invoke the `tripleo` target of `install_yamls`.

For that, you can also adjust as needed and use the following commands
(instead of an example `rhos-release` commands, use a tool of your choice):

[,bash]
----
export RH_REGISTRY_USER="<insert your registry.redhat.io user>"
export RH_REGISTRY_PWD="<insert your registry.redhat.io password>"
cd ~/install_yamls/devsetup
cat <<EOF > /tmp/osp17_repos
# Rhos-release steps are only available from the internal RedHat network, use a tool of your choice instead!
#sudo rhos-release -x
#sudo rhos-release 17.1
sudo dnf install -y git curl wget util-linux lvm2 podman python3-tripleoclient
EOF
export CENTOS_9_STREAM_URL=<insert url to rhel-guest-image-9.2.x86_64.qcow2>
export NTP_SERVER=<insert ntp server of your choice>
export MANILA_ENABLED=false
export EDPM_COMPUTE_CEPH_ENABLED=false
export EDPM_COMPUTE_CEPH_NOVA=false
export EDPM_COMPUTE_CELLS=3
export STANDALONE_EXTRA_CMD="bash -c 'echo \"$RH_REGISTRY_PWD\" > ~/authfile; chmod 0600 ~/authfile; sudo /bin/podman login registry.redhat.io -u \"$RH_REGISTRY_USER\" --password-stdin < ~/authfile'"
export REPO_SETUP_CMDS=/tmp/osp17_repos
export EDPM_TOTAL_NODES=1
export SKIP_TRIPLEO_REPOS=false
export IP_ADRESS_SUFFIX=100
export EDPM_COMPUTE_NETWORK_IP=192.168.122.1
export HOST_PRIMARY_RESOLV_CONF_ENTRY=192.168.122.1
export BASE_DISK_FILENAME="rhel-9-base.qcow2"
make edpm_compute EDPM_COMPUTE_SUFFIX=0 EDPM_COMPUTE_DISK_SIZE=10 EDPM_COMPUTE_RAM=9 EDPM_COMPUTE_VCPUS=2
make edpm_compute EDPM_COMPUTE_SUFFIX=1 EDPM_COMPUTE_DISK_SIZE=17 EDPM_COMPUTE_RAM=12 EDPM_COMPUTE_VCPUS=4
make edpm_compute EDPM_COMPUTE_SUFFIX=2 EDPM_COMPUTE_DISK_SIZE=14 EDPM_COMPUTE_RAM=12 EDPM_COMPUTE_VCPUS=4
make edpm_compute EDPM_COMPUTE_SUFFIX=3 EDPM_COMPUTE_DISK_SIZE=10 EDPM_COMPUTE_RAM=4 EDPM_COMPUTE_VCPUS=2
make edpm_compute EDPM_COMPUTE_SUFFIX=4 EDPM_COMPUTE_DISK_SIZE=16 EDPM_COMPUTE_RAM=12 EDPM_COMPUTE_VCPUS=4
for n in 0 1 2 3 4; do
ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
[email protected]${n} useradd --create-home --shell /bin/bash --groups root zuul
scp -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa [email protected]${n}:/home/zuul/.ssh/id_rsa
ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
[email protected]${n} cp /root/.ssh/authorized_keys /home/zuul/.ssh/authorized_keys
ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
[email protected]${n} chown zuul: /home/zuul/.ssh/*
ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa \
[email protected]${n} echo "zuul ALL=NOPASSWD:ALL" '>' /etc/sudoers.d/zuul; done
done
make tripleo_deploy
for n in 0 1 2 3 4; do make standalone_snapshot EDPM_COMPUTE_SUFFIX=$n; done
----

== Network routing

Route VLAN20 to have access to the MariaDB cluster:
Expand Down
3 changes: 3 additions & 0 deletions tests/vars.sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@ ironic_adoption: false
# Run pre-adoption validation before the deploying
run_pre_adoption_validation: true

# Adopt source cloud with additional compute cells v2
multi_cell: false

# Whether the adopted node will host compute services
compute_adoption: true

0 comments on commit 0b11b12

Please sign in to comment.