Skip to content

Commit fb23d39

Browse files
committed
re-introduce basic ci/cd
1 parent 5d56744 commit fb23d39

File tree

3 files changed

+88
-17
lines changed

3 files changed

+88
-17
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,48 @@ name: CI for chi-in-a-box script
44
on:
55
push:
66
branches:
7-
- master
7+
- main
8+
- stable/*
89
pull_request:
910
branches:
10-
- master
11+
- main
12+
- stable/*
13+
workflow_dispatch: {}
1114

1215
jobs:
13-
test:
14-
name: test cc-ansible
15-
runs-on: [self-hosted, kvm, ciab, ubuntu-18.04]
16+
ci:
17+
name: basic setup checks
18+
runs-on: [ ubuntu-22.04 ]
1619
env:
1720
CC_ANSIBLE_SITE: /opt/site-config
18-
defaults:
19-
run:
20-
shell: bash
2121
steps:
22-
- name: Checkout code base
23-
uses: actions/checkout@v2
24-
- name: init site-config
25-
run: "./cc-ansible init"
26-
continue-on-error: true
27-
- run: "./cc-ansible bootstrap-servers"
28-
- run: "./cc-ansible prechecks"
29-
- run: "./cc-ansible pull"
30-
- run: "./cc-ansible genconfig"
22+
23+
- name: checkout chi-in-a-box
24+
uses: actions/checkout@v5
25+
with:
26+
submodules: true
27+
28+
- name: setup dummy network interfaces
29+
run: tests/setup_ifaces.sh
30+
31+
- name: install deps
32+
run: ./cc-ansible install_deps
33+
34+
- name: initialize site-config
35+
run: ./cc-ansible init
36+
37+
# TODO: Parameterize config file choice
38+
- name: configure site for test config
39+
run: cp tests/configs/chi_edge.yaml ${CC_ANSIBLE_SITE}/defaults.yaml
40+
41+
- name: bootstrap system
42+
run: ./cc-ansible bootstrap-servers
43+
44+
- name: pull containers
45+
run: ./cc-ansible pull
46+
47+
- name: generate configs
48+
run: ./cc-ansible genconfig
49+
50+
- name: deploy services
51+
run: ./cc-ansible deploy

tests/configs/chi_edge.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
3+
### Overrides for edge configuration
4+
5+
enable_heat: false
6+
enable_glance: false
7+
enable_nova: false
8+
enable_ironic: false
9+
10+
enable_k3s: yes
11+
enable_zun: yes
12+
13+
14+
# temp for debugging
15+
enable_blazar: false
16+
enable_doni: false
17+
enable_tunelo: false
18+
19+
enable_central_logging: false
20+
enable_prometheus: false
21+
22+
23+
network_interface: veth-inta
24+
kolla_internal_vip_address: 10.10.10.254
25+
kolla_internal_fqdn: "{{ kolla_internal_vip_address }}"
26+
27+
28+
kolla_external_vip_interface: veth-publica
29+
kolla_external_vip_address: 192.168.200.254
30+
kolla_external_fqdn: "{{ kolla_external_vip_address }}"
31+
32+
k3s_tag: c777a4a

tests/setup_ifaces.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# kolla public/external iface
4+
sudo ip link add veth_publica type veth peer veth_publicb
5+
sudo ip addr add 192.168.200.10/24 dev veth_publica
6+
sudo ip link set veth_publica up
7+
sudo ip link set veth_publicb up
8+
9+
# kolla internal iface
10+
sudo ip link add veth_inta type veth peer veth_intb
11+
sudo ip addr add 10.10.10.10/24 dev veth_inta
12+
sudo ip link set veth_inta up
13+
sudo ip link set veth_intb up
14+
15+
# neutron external iface
16+
sudo ip link add veth_neutrona type veth peer veth_neutronb
17+
sudo ip link set veth_neutrona up
18+
sudo ip link set veth_neutronb up

0 commit comments

Comments
 (0)