Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration-guide: working with Git branches #633

Merged
merged 4 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 55 additions & 7 deletions docs/guides/configuration-guide/manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ In the example, OSISM release 7.0.5 is used.
1. Set the new manager version in the configuration repository.

```
MANAGER_VERSION=7.0.5
sed -i -e "s/manager_version: .*/manager_version: ${MANAGER_VERSION}/g" environments/manager/configuration.yml
MANAGER_VERSION="7.0.5"
sed -i "~s,^manager_version:.*\$,manager_version: ${MANAGER_VERSION}," environments/manager/configuration.yml
```

2. If `openstack_version` or `ceph_version` are set in `environments/manager/configuration.yml`
Expand All @@ -41,10 +41,11 @@ In the example, OSISM release 7.0.5 is used.
<TabItem value="osism-6" label="OSISM < 7.0.0">
If Gilt is not installed via the `requirements.txt` of the manager environment it is
important to use a version smaller v2. The v2 of Gilt is not yet usable.

```
gilt overlay # you have to do this 2x, this is not a copy & paste error
gilt overlay
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
gilt overlay && gilt overlay
```

Optionally, this is normally not necessary, it is possible to reference a specific tag of the
Expand All @@ -63,11 +64,58 @@ In the example, OSISM release 7.0.5 is used.
workflows for changes to the configuration repository, only a generic example for Git.

```
git commit -a -s -m "manager: use OSISM version 7.0.5"
git commit -a -s -m "manager: use OSISM version ${MANAGER_VERSION?}"
git push
```

## Working with Git branches

For example, for compliance and security reasons, many organizations prefer to prepare changes to
production systems on dedicated Git branches, roll them out to the production environment
using the 4-eyes control principle and then finally transfer them to the `main` branch through a
review and release process.

A typical scenario is the [Manager Upgrade](../upgrade-guide/manager.mdx).

OSISM offers the option of using specific Git branches on the manager.

The Git branch can be changed in the following way:

1. Create a branch

```bash
git checkout -b YOUR-BRANCH-FOR-CHANGE-XYZ
```

2. Set the branch name of your deployment branch with the variable `configuration_git_version` in `configuration.yml`.
This needs always to be changed on the manager node later if you merge the current branch to another target branch.

```bash
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
sed -i "~s,^configuration_git_version:.*\$,configuration_git_version: ${BRANCH}," environments/configuration.yml
git commit -m "Starting to work on #<issue-id>" -s environment/configuration.yml
git push
```

5. The upgrade is described in the [Manager Upgrade Guide](../upgrade-guide/manager).
3. Login to the manager and activate the branch
(not needed when performing a initial manager install)

```bash
cd /opt/configuration
git fetch
git checkout YOUR-BRANCH-FOR-CHANGE-XYZ
osism apply configuration
```

4. *Recommended:* Rebuild inventories and update facts
(On changing branches there are oft potential changes in the inventory structure)

```
osism reconciler sync
osism apply facts
```

5. Start your work on the topic and perfom a final review when the topic is complete

## OpenSearch integration

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/deploy-guide/manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ on the seed node. The deployment of the seed node itself is documented in the
cd environments/manager
```

If you are working with Git branches, read [the instructions](../configuration-guide/manager.mdx).

### Step 1: Create operator user

The operator user is created on each node. It is used as a service account for OSISM. All
Expand Down Expand Up @@ -200,7 +202,6 @@ with the `dragon` user.

```
osism set vault password
Ansible Vault password: ********
```

Ready. The manager is now prepared and you can continue with the bootstrap of the other nodes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_label: OpenStack Health Monitor
Kurt Garloff, 2024-02-20

## Intro
The development of [openstack-health-monitor](https://github.com/SovereignCloudStack/openstack-health-monitor/) was done on [openSUSE 15.x images](https://kfg.images.obs-website.eu-de.otc.t-systems.com/), just because the author is very familiar with it and has some of the needed tools preinstalled. That said, the setup is not depending on anything specific from openSUSE and should work on every modern Linux distribution.
The development of [openstack-health-monitor](https://github.com/SovereignCloudStack/openstack-health-monitor/) was done on [openSUSE 15.x images](http://kfg.images.obs-website.eu-de.otc.t-systems.com/), just because the author is very familiar with it and has some of the needed tools preinstalled. That said, the setup is not depending on anything specific from openSUSE and should work on every modern Linux distribution.

Setting it up again in a different environment using Debian 12 images avoids a few of the shortcuts that were used and thus should be very suitable instructions to get it working in general. The step by step instructions are covered here.

Expand Down
Loading