Skip to content

Commit 1086e6f

Browse files
committed
docs: Various improvements to the ci-aio and ci-builder docs
1 parent bc83165 commit 1086e6f

File tree

5 files changed

+131
-24
lines changed

5 files changed

+131
-24
lines changed

doc/source/contributor/environments/ci-aio.rst

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ Prerequisites
1414
=============
1515

1616
* a Rocky Linux 9 or Ubuntu Jammy 22.04 host
17-
* access to the Test Pulp server on SMS lab
1817

1918
Automated Setup
2019
===============
2120

22-
Access the host via SSH.
21+
Access the host via SSH. You may wish to start a ``tmux`` session.
2322

2423
Download the setup script:
2524

@@ -67,12 +66,29 @@ Host Configuration
6766

6867
Access the host via SSH.
6968

70-
Install package dependencies when on Ubuntu:
69+
If using an LVM-based image, extend the ``lv_home`` and ``lv_tmp`` logical
70+
volumes.
71+
72+
.. parsed-literal::
73+
74+
sudo pvresize $(sudo pvs --noheadings | head -n 1 | awk '{print $1}')
75+
sudo lvextend -L 4G /dev/rootvg/lv_home -r
76+
sudo lvextend -L 4G /dev/rootvg/lv_tmp -r
77+
78+
Install package dependencies.
79+
80+
On Rocky Linux:
81+
82+
.. parsed-literal::
83+
84+
sudo dnf install -y git
85+
86+
On Ubuntu:
7187

7288
.. parsed-literal::
7389
7490
sudo apt update
75-
sudo apt install -y python3-virtualenv
91+
sudo apt install -y gcc git libffi-dev python3-dev python-is-python3 python3-venv
7692
7793
Clone the Kayobe and Kayobe configuration repositories (this one):
7894

@@ -92,7 +108,7 @@ Create a virtual environment and install Kayobe:
92108
cd
93109
mkdir -p venvs
94110
pushd venvs
95-
virtualenv kayobe
111+
python3 -m venv kayobe
96112
source kayobe/bin/activate
97113
pip install -U pip
98114
pip install ../src/kayobe
@@ -109,6 +125,12 @@ Add initial network configuration:
109125
sudo ip l set dummy1 up
110126
sudo ip l set dummy1 master breth1
111127
128+
On Ubuntu systems, persist the running network configuration.
129+
130+
.. parsed-literal::
131+
132+
sudo cp /run/systemd/network/* /etc/systemd/network
133+
112134
Configuration
113135
=============
114136

@@ -143,6 +165,18 @@ Ansible control host.
143165
Deployment
144166
----------
145167

168+
If using an LVM-based image, grow the root volume group.
169+
170+
.. parsed-literal::
171+
172+
kayobe playbook run etc/kayobe/ansible/growroot.yml
173+
174+
On Ubuntu systems, purge the command-not-found package.
175+
176+
.. parsed-literal::
177+
178+
kayobe playbook run etc/kayobe/ansible/purge-command-not-found.yml
179+
146180
Next, configure the host OS & services.
147181

148182
.. parsed-literal::

doc/source/contributor/environments/ci-builder.rst

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,47 @@ ci-builder
33
==========
44

55
The ``ci-builder`` Kayobe environment is used to build Kolla container images.
6-
Images are built using package repositories in the StackHPC development Pulp
7-
service, and pushed there once built.
8-
9-
.. warning::
10-
11-
This guide was written for the Yoga release and has not been validated for
12-
Antelope. Proceed with caution.
6+
Images are built using package repositories in the StackHPC Ark Pulp service,
7+
and pushed there once built.
138

9+
In general it is preferable to use the `container image build CI workflow
10+
<https://github.com/stackhpc/stackhpc-kayobe-config/actions/workflows/stackhpc-container-image-build.yml>`_
11+
to build container images, but this manual approach may be useful in some
12+
cases.
1413

1514
Prerequisites
1615
=============
1716

1817
* a Rocky Linux 9 or Ubuntu Jammy 22.04 host
19-
* access to the Test Pulp server on SMS lab
2018

2119
Setup
2220
=====
2321

24-
Access the host via SSH.
22+
Access the host via SSH. You may wish to start a ``tmux`` session.
23+
24+
If using an LVM-based image, extend the ``lv_home`` and ``lv_tmp`` logical
25+
volumes.
26+
27+
.. parsed-literal::
28+
29+
sudo pvresize $(sudo pvs --noheadings | head -n 1 | awk '{print $1}')
30+
sudo lvextend -L 4G /dev/rootvg/lv_home -r
31+
sudo lvextend -L 4G /dev/rootvg/lv_tmp -r
2532
2633
Install package dependencies.
2734

2835
On Rocky Linux:
2936

3037
.. parsed-literal::
3138
32-
sudo dnf install -y python3-virtualenv
39+
sudo dnf install -y git
3340
3441
On Ubuntu:
3542

3643
.. parsed-literal::
3744
3845
sudo apt update
39-
sudo apt install -y python3-virtualenv
46+
sudo apt install -y gcc git libffi-dev python3-dev python-is-python3 python3-venv
4047
4148
Clone the Kayobe and Kayobe configuration repositories (this one):
4249

@@ -56,7 +63,7 @@ Create a virtual environment and install Kayobe:
5663
cd
5764
mkdir -p venvs
5865
pushd venvs
59-
virtualenv kayobe
66+
python3 -m venv kayobe
6067
source kayobe/bin/activate
6168
pip install -U pip
6269
pip install ../src/kayobe
@@ -73,6 +80,12 @@ Add initial network configuration:
7380
sudo ip l set dummy1 up
7481
sudo ip l set dummy1 master breth1
7582
83+
On Ubuntu systems, persist the running network configuration.
84+
85+
.. parsed-literal::
86+
87+
sudo cp /run/systemd/network/* /etc/systemd/network
88+
7689
Installation
7790
============
7891

@@ -95,6 +108,21 @@ Ansible control host.
95108
Deployment
96109
==========
97110

111+
If using an LVM-based image, uncomment the ``seed_lvm_groups`` variable in
112+
``etc/kayobe/environments/ci-builder/seed.yml``.
113+
114+
If using an LVM-based image, grow the root volume group.
115+
116+
.. parsed-literal::
117+
118+
kayobe playbook run etc/kayobe/ansible/growroot.yml -e growroot_group=seed
119+
120+
On Ubuntu systems, purge the command-not-found package.
121+
122+
.. parsed-literal::
123+
124+
kayobe playbook run etc/kayobe/ansible/purge-command-not-found.yml
125+
98126
Next, configure the host OS & services.
99127

100128
.. parsed-literal::
@@ -142,8 +170,17 @@ At this point you are ready to build and push some container images.
142170
If using an :ref:`authenticating Pulp proxy <authenticating-pulp-proxy>`,
143171
append ``-e stackhpc_repo_mirror_auth_proxy_enabled=true`` to these commands.
144172

145-
The container images are tagged as |current_release|-<datetime>.
173+
The container images are tagged as |current_release|-<distribution>-<datetime>.
174+
Check ``tag`` in ``/opt/kayobe/etc/kolla/kolla-build.conf`` or run ``docker
175+
image ls`` to see the tag of the new images.
176+
177+
To build images for a different base distribution, set ``-e
178+
kolla_base_distro=<distro>``.
179+
180+
To build images using a specific tag, set ``-e kolla_tag=<tag>``.
181+
182+
Using the new images
183+
====================
146184

147185
To use the new images, edit
148-
``~/src/kayobe-config/etc/kayobe/kolla.yml`` to set the above
149-
tag as the value of the ``kolla_openstack_release`` variable.
186+
``~/src/kayobe-config/etc/kayobe/kolla-image-tags.yml`` to reference the tag.

etc/kayobe/environments/ci-aio/automated-setup.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ elif $KAYOBE_AIO_LVM; then
2424
exit 1
2525
fi
2626

27-
cat << EOF | sudo tee -a /etc/hosts
28-
10.205.3.187 pulp-server pulp-server.internal.sms-cloud
29-
EOF
30-
3127
if type dnf; then
3228
sudo dnf -y install git
3329
else
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# List of extra LVs to include in the rootvg VG.
3+
stackhpc_lvm_group_rootvg_lvs_extra:
4+
- "{{ stackhpc_lvm_lv_docker }}"
5+
6+
###############################################################################
7+
# StackHPC LVM Logical Volume (LV) configuration.
8+
9+
# StackHPC LVM lv_swap LV size.
10+
stackhpc_lvm_lv_swap_size: 500m
11+
12+
# StackHPC LVM lv_root LV size.
13+
stackhpc_lvm_lv_root_size: 2g
14+
15+
# StackHPC LVM lv_tmp LV size.
16+
stackhpc_lvm_lv_tmp_size: 2g
17+
18+
# StackHPC LVM lv_var LV size.
19+
stackhpc_lvm_lv_var_size: 2g
20+
21+
# StackHPC LVM lv_var_tmp LV size.
22+
stackhpc_lvm_lv_var_tmp_size: 2g
23+
24+
# StackHPC LVM lv_log LV size.
25+
stackhpc_lvm_lv_log_size: 2g
26+
27+
# StackHPC LVM lv_audit LV size.
28+
stackhpc_lvm_lv_audit_size: 250m
29+
30+
# StackHPC LVM lv_home LV size.
31+
stackhpc_lvm_lv_home_size: 2g
32+
33+
# StackHPC LVM lv_docker LV size.
34+
stackhpc_lvm_lv_docker_size: 95%FREE

etc/kayobe/environments/ci-builder/seed.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@
55
# User with which to access the seed via SSH during bootstrap, in order
66
# to setup the Kayobe user account. Default is {{ os_distribution }}.
77
seed_bootstrap_user: "{{ os_distribution if os_distribution == 'ubuntu' else 'cloud-user' }}"
8+
9+
# Uncomment this if using an LVM-based image.
10+
# Seed lvm configuration. See inventory/group_vars/seed/lvm.yml
11+
# for the exact configuration.
12+
# seed_lvm_groups:
13+
# - "{{ stackhpc_lvm_group_rootvg }}"

0 commit comments

Comments
 (0)