Skip to content
Closed
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
88 changes: 88 additions & 0 deletions .github/workflows/kolla-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
name: Build kolla images
on:
workflow_dispatch:
inputs:
regexes:
description: Space-separated list of regular expressions matching images to build
type: string
required: false
default: ""

env:
ANSIBLE_FORCE_COLOR: True
jobs:
build:
name: Build kolla images
runs-on: [self-hosted, stackhpc-kayobe-config-kolla-builder]
steps:
- uses: actions/checkout@master
with:
path: src/kayobe-config

- name: Clone StackHPC Kayobe repository
uses: actions/checkout@master
with:
repository: stackhpc/kayobe
ref: refs/heads/stackhpc/wallaby
path: src/kayobe

# FIXME: Failed in kolla-ansible : Ensure the latest version of pip is installed
- name: Install dependencies
run: |
sudo dnf -y install python3-virtualenv

- name: Setup networking
run: |
if ! ip l show breth1 >/dev/null 2>&1; then
sudo ip l add breth1 type bridge
fi
sudo ip l set breth1 up
if ! ip a show breth1 | grep 192.168.33.3/24; then
sudo ip a add 192.168.33.3/24 dev breth1
fi
if ! ip l show dummy1 >/dev/null 2>&1; then
sudo ip l add dummy1 type dummy
fi
sudo ip l set dummy1 up
sudo ip l set dummy1 master breth1

- name: Install Kayobe
run: |
mkdir -p venvs &&
pushd venvs &&
python3 -m venv kayobe &&
source kayobe/bin/activate &&
pip install -U pip &&
pip install ../src/kayobe

- name: Bootstrap the control host
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment builder &&
kayobe control host bootstrap

- name: Configure the seed host
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment builder &&
kayobe seed host configure
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}

- name: Build and push kolla overcloud images
run: |
source venvs/kayobe/bin/activate &&
source src/kayobe-config/kayobe-env --environment builder &&
kayobe overcloud container image build ${{ github.events.input.regexes }} --push
env:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}

- name: Get the container image tag
run: |
echo "::set-output name=kolla_tag::$(cat ~/kolla_tag)"
id: kolla_tag

- name: Display the container image tag
run: |
echo "${{ steps.kolla_tag.outputs.kolla_tag }}"