Compare commits

...

59 Commits

Author SHA1 Message Date
Mike Holloway
ddec4cedb5 Resolving cascading boot error in alma9.8 that results from acl boot option 2026-07-31 11:21:05 -04:00
Mike Holloway
b16224334f Add acl option to root mount in fstab 2025-11-28 00:59:20 -05:00
Mike Holloway
0fcfdd4bbc Move certain packages to role instead of linode CI
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m20s
2025-01-07 22:42:24 -05:00
Mike Holloway
d7a553f1dd Move certain packages to role instead of CI
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m56s
2025-01-07 22:32:36 -05:00
Mike Holloway
0b1a8fef37 Switch single platform via env var, syntax check
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m43s
2025-01-07 22:27:05 -05:00
Mike Holloway
08d64e1cb1 Switch single platform via env var
Some checks failed
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Failing after 23s
2025-01-07 22:23:18 -05:00
Mike Holloway
3094dea795 CI platform packages update, dnf_packages list for targets
Some checks failed
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Failing after 3m24s
2025-01-07 21:49:42 -05:00
Mike Holloway
2ef9c930cb fedora39 platform added
Some checks failed
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Failing after 2m34s
2025-01-07 21:26:13 -05:00
Mike Holloway
77bbbc8ffb Revert "tags: - 'molecule-notest'"
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m36s
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m59s
Reason:

  Running on linode instances, /etc/hosts file changes are worth
testing.

This reverts commit f51c228573.
2025-01-07 20:46:57 -05:00
Mike Holloway
7d46ec7d7d requirements.yml
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m15s
2025-01-07 20:33:26 -05:00
Mike Holloway
af221cb741 Use linode hosts
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m26s
2025-01-07 20:27:19 -05:00
Mike Holloway
a49e672ec0 First draft linode scenario converge, destroy steps
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m31s
2025-01-07 20:12:07 -05:00
Mike Holloway
336d673393 gitea actions tofu authorized_keys, inventory_hostname
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m28s
2025-01-07 19:54:39 -05:00
Mike Holloway
23bee6e6f9 ansible ssh debug, ssh config usage, copy step added
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m4s
2025-01-07 19:34:57 -05:00
Mike Holloway
a12732a7b9 ansible ssh debug, copy step for private key, verbose ssh connection check
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 6m52s
2025-01-07 19:22:15 -05:00
Mike Holloway
08ea840c99 ansible ssh debug, checking accept-new option for pre-inventory reachability test, printing full isping object
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 4m59s
2025-01-07 19:12:16 -05:00
Mike Holloway
4430880f8f Private key check using HOME env var, reach test output cleanup
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 4m52s
2025-01-07 19:00:25 -05:00
Mike Holloway
5ebaffdba2 Correct private key path, linode hosts ansible_user set
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m2s
2025-01-07 18:49:36 -05:00
Mike Holloway
cc7db336bb Quotes around interpolated gitea actions secret as exported env var in run: step
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 4m53s
2025-01-07 18:38:37 -05:00
Mike Holloway
9dad63a0e0 Deploy Key gitea actions secret
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 4m51s
2025-01-07 18:12:38 -05:00
Mike Holloway
19dc7cb495 Host key checking workaround check
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m1s
2025-01-07 07:13:09 -05:00
Mike Holloway
1ba3039f28 More retries, longer delay
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m4s
2025-01-07 07:04:48 -05:00
Mike Holloway
2522389d35 ssh -T step retries
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m17s
2025-01-07 07:00:01 -05:00
Mike Holloway
664b12e508 continue-on-error: for good vps hygiene, 5m timeout for ssh connection test
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 5m0s
2025-01-07 06:49:36 -05:00
Mike Holloway
e03e08f81d ping missing, ssh -T instead
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 1m27s
2025-01-07 06:43:24 -05:00
Mike Holloway
5c75f85d9d tofu and molecule combined test, correct scenario flag, correct ANSIBLE_ROLES_PATH env var
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 1m26s
2025-01-07 06:38:14 -05:00
Mike Holloway
a895093720 tofu and molecule combined test, with correct path for checkout and adjusted working-directory, python step
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 2m14s
2025-01-07 06:32:26 -05:00
Mike Holloway
c1373fdeb4 tofu and molecule combined test, with correct path for checkout and adjusted working-directory
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 1m17s
2025-01-07 06:23:28 -05:00
Mike Holloway
de2125deab tofu and molecule combined test, with correct path for checkout
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 25s
2025-01-07 06:21:53 -05:00
Mike Holloway
189e33d9f4 tofu and molecule combined test, first try
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 1m15s
2025-01-07 06:18:10 -05:00
Mike Holloway
5cbd574a02 tofu plan, tofu output json capture and export test part VII
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m2s
2025-01-07 05:15:27 -05:00
Mike Holloway
ad2646c7b8 tofu plan, tofu output json capture and export test part VI
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m3s
2025-01-07 05:11:12 -05:00
Mike Holloway
09e9529e77 tofu plan, tofu output json capture and export test part V
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 1m40s
2025-01-07 04:58:59 -05:00
Mike Holloway
3dc23d3548 tofu plan, tofu output json capture and export test part IV
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 33s
2025-01-07 04:56:32 -05:00
Mike Holloway
3b9d996c50 tofu plan, tofu output json capture and export test part III 2025-01-07 04:55:08 -05:00
Mike Holloway
382ef9743e tofu plan, tofu output json capture and export test part II 2025-01-07 04:50:53 -05:00
Mike Holloway
21bbb23545 tofu plan, tofu output json capture and export test 2025-01-07 04:44:06 -05:00
Mike Holloway
34aae1b35e tofu plan, tofu output test
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 34s
2025-01-07 04:33:58 -05:00
Mike Holloway
65d43e1da8 tofu apply && sleep 300 && tofu destroy
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m22s
2025-01-07 04:20:54 -05:00
Mike Holloway
587eeb8ca0 tofu plan
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 30s
2025-01-07 04:18:23 -05:00
Mike Holloway
381de46f2e tofu syntax check
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 31s
2025-01-07 04:16:17 -05:00
Mike Holloway
27882fbfe2 tofu init test part X
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 28s
2025-01-07 04:14:22 -05:00
Mike Holloway
1fcc4a574e tofu init test part IX
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 29s
2025-01-07 04:12:40 -05:00
Mike Holloway
2b0f2ad0b7 tofu init test part VIII
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 28s
2025-01-07 04:10:51 -05:00
Mike Holloway
9246eab0cb tofu init test part VII
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 30s
2025-01-07 04:09:17 -05:00
Mike Holloway
6812e50ffe tofu init test part VI
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 27s
2025-01-07 04:08:04 -05:00
Mike Holloway
31a60ec91e tofu init test part V
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 30s
2025-01-07 04:06:55 -05:00
Mike Holloway
64de163949 tofu init test part IV
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 30s
2025-01-07 04:05:50 -05:00
Mike Holloway
6f99869aee tofu init test part III
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 28s
2025-01-07 04:03:56 -05:00
Mike Holloway
fd652f20e1 tofu init test part II
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 31s
2025-01-07 04:02:06 -05:00
Mike Holloway
d6f7354060 tofu init test
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 25s
2025-01-07 03:57:10 -05:00
Mike Holloway
09fa4da80d Add basic tofu workflow, debug gitea act secrets in env part III
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 24s
2025-01-07 03:52:51 -05:00
Mike Holloway
901b0d4aa4 Add basic tofu workflow, debug gitea act secrets in env part II
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 26s
2025-01-07 03:50:08 -05:00
Mike Holloway
ac0c9ac39c Add basic tofu workflow, debug gitea act secrets in env
Some checks failed
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Failing after 0s
2025-01-07 03:47:07 -05:00
Mike Holloway
e4abdeb926 Merge tag 'molecule-test' 2025-01-07 03:16:08 -05:00
Mike Holloway
23310cea5b Merge commit '48c4a09d5d'
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m50s
2025-01-07 03:12:36 -05:00
Mike Holloway
3fb4b124a1 Distinguish build tag for molecule
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 3m7s
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 23s
2025-01-07 02:58:01 -05:00
Mike Holloway
48c4a09d5d Simple single-target tofu build is the goal
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m52s
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 22s
2025-01-07 02:52:01 -05:00
Mike Holloway
b2b2c319bb Simple single-target tofu build is the goal
All checks were successful
Gitea Actions - molecule test work / Explore-molecule-Gitea-Action (push) Successful in 2m56s
2025-01-07 02:34:38 -05:00
11 changed files with 248 additions and 9 deletions

28
.gitea/tofu/main.tf Normal file
View File

@ -0,0 +1,28 @@
terraform {
required_providers {
linode = {
source = "linode/linode"
# version = "..."
}
}
}
# Configure the Linode Provider
provider "linode" {
token = var.token
}
resource "linode_instance" "eqit_test_instance" {
image = "linode/almalinux9"
label = "act_worker"
region = "us-ord"
type = "g6-nanode-1"
authorized_keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeRI1w3uNny7KjK2UdlAnyoGdGgtOx4isSD52u5dr4QkkdLRMj42dLjgT0MK+QehlgaH2XzFPMDz+hZQ+66YeBSm+F4km/8F9XVyUzGl0scUA1p0pqeL3FiyM3Art4Bo71zuE3PvMjyI3pGMKQ3VDWVA0XdAjjSw4G+czJTxZLLBPGvzDT07WuWM4Evl6H21Gn7PB6CKNV0vuUZwGiCsjRbghml1L2kDtTXV1B6wQsniuhQigIVo6YXhMgge/2UCcmiyeEizdfaSstrQHEyxFMvlPUJyw4a3plAuPORDyZdAFF6OA7/wP5fVWoCu/CkbMIDjPifXGQOuhQU1qUVy7r m00t@miserver.lan","ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINi1TmECeYdnrw8OCiBVB+rm8SwBWcz98Se/q+3l3iM/ act_runner@miserver.lan"]
root_pass = "supersecrettestpassword"
}
variable "token" {}
output "act_worker_ip_address" {
value = linode_instance.eqit_test_instance.ip_address
}

View File

@ -1,6 +1,9 @@
name: Gitea Actions - molecule test work
run-name: ${{ gitea.actor }} is running molecule test work
on: [push]
on:
push:
tags:
- 'molecule-test'
jobs:
Explore-molecule-Gitea-Action:

View File

@ -0,0 +1,36 @@
name: Gitea Actions - molecule test work
run-name: ${{ gitea.actor }} is running molecule test work
on:
push:
tags:
- 'linode-test'
jobs:
Explore-terraform-molecule-Gitea-Action:
env:
ANSIBLE_ROLES_PATH: '/workspace/seasharp/ansible-role_podman-host'
TF_VAR_token: "${{ secrets.LINODE_API_TOKEN }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: 'podman-host'
- uses: opentofu/setup-opentofu@v1
- name: tofu apply
run: "tofu init && tofu apply -auto-approve"
working-directory: "${{ gitea.workspace }}/podman-host/.gitea/tofu"
- name: Set up Python
uses: actions/setup-python@v2
- name: molecule test
continue-on-error: true
run: |
export TARGET_IP_ADDRESS=$(tofu output -raw act_worker_ip_address)
export ACT_RUNNER_DEPLOY_KEY="${{ secrets.ACT_RUNNER_DEPLOY_KEY }}"
cd ${{ gitea.workspace}}/podman-host/extensions
molecule test -s linode
working-directory: "${{ gitea.workspace }}/podman-host/.gitea/tofu"
- name: tofu destroy
run: "sleep 180 && tofu destroy -auto-approve"
working-directory: "${{ gitea.workspace }}/podman-host/.gitea/tofu"

View File

@ -91,9 +91,9 @@
gather_facts: false
tasks:
- name: Packages openssh-server, python3-policycoreutils
- name: Package procps-ng
ansible.builtin.dnf:
name: ['openssh-server', 'python3-policycoreutils']
name: procps-ng
state: present
- name: systemd PID

View File

@ -9,7 +9,7 @@ driver:
ansible_connection: docker
platforms:
- name: instance
image: geerlingguy/docker-rockylinux9-ansible:latest
image: geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest
command: "/sbin/init"
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro

View File

@ -0,0 +1,26 @@
---
- name: Fail if linode group is missing
hosts: localhost
tasks:
- name: Print some info
ansible.builtin.debug:
msg: "{{ groups }}"
- name: Assert group existence
ansible.builtin.assert:
that: "'linode' in groups"
fail_msg: |
linode group was not found inside inventory groups: {{ groups }}
- name: Converge
hosts: linode
# We disable gather facts because it would fail due to our container not
# having python installed. This will not prevent use from running 'raw'
# commands. Most molecule users are expected to use containers that already
# have python installed in order to avoid notable delays installing it.
tasks:
- name: Apply podman-host Role
include_role:
name: podman-host
# ansible.builtin.assert:
# that: result.stdout | regex_search("^Linux")

View File

@ -0,0 +1,113 @@
---
- name: Create
hosts: localhost
connection: local
gather_facts: false
# no_log: "{{ molecule_no_log }}"
vars:
molecule_inventory:
all:
hosts: {}
linode: {}
tasks:
- name: ssh key setup
copy:
content: |
{{ lookup('env', 'ACT_RUNNER_DEPLOY_KEY') }}
dest: "~/.ssh/id_ed25519"
- name: ssh config setup
copy:
content: |
Host act_worker
Hostname {{ lookup('env', 'TARGET_IP_ADDRESS') }}
StrictHostKeyChecking accept-new
User root
IdentityFile ~/.ssh/id_ed25519
dest: "~/.ssh/config"
- name: Confirm we can reach
command:
cmd: |
ssh -vv -T act_worker
retries: 12
delay: 10
register: isping
until: isping.rc == 0
- debug:
msg: |
{{ isping }}
- name: Fail if instance is not running
when: isping.failed
fail:
- name: Add linode to molecule_inventory
vars:
inventory_partial_yaml: |
all:
children:
linode:
hosts:
act_worker:
ansible_connection: ssh
service_users:
- name: serviceuser1
services:
- service1
- service2
ansible.builtin.set_fact:
molecule_inventory: >
{{ molecule_inventory | combine(inventory_partial_yaml | from_yaml, recursive=true) }}
- name: Dump molecule_inventory
ansible.builtin.copy:
content: |
{{ molecule_inventory | to_yaml }}
dest: "{{ molecule_ephemeral_directory }}/inventory/molecule_inventory.yml"
mode: "0600"
- name: Force inventory refresh
ansible.builtin.meta: refresh_inventory
- name: Fail if linode group is missing
ansible.builtin.assert:
that: "'linode' in groups"
fail_msg: |
linode group was not found inside inventory groups: {{ groups }}
run_once: true # noqa: run-once[task]
# we want to avoid errors like "Failed to create temporary directory"
- name: Validate that inventory was refreshed
hosts: linode
gather_facts: false
tasks:
- name: Check uname
ansible.builtin.raw: uname -a
register: result
changed_when: false
- name: Display uname info
ansible.builtin.debug:
msg: "{{ result.stdout }}"
- name: Verify linode properties
hosts: linode
gather_facts: false
tasks:
- name: Package procps-ng
ansible.builtin.dnf:
name: procps-ng
state: present
- name: systemd PID
command: ps -q 1
register: ps_result
changed_when: false
- name: Display PID 1 info
ansible.builtin.debug:
msg: "{{ ps_result.stdout }}"

View File

@ -0,0 +1,15 @@
---
- name: Destroy
hosts: localhost
connection: local
gather_facts: false
# no_log: "{{ molecule_no_log }}"
tasks:
- name: Remove dynamic molecule inventory
hosts: localhost
gather_facts: false
tasks:
- name: Remove dynamic inventory file
ansible.builtin.file:
path: "{{ molecule_ephemeral_directory }}/inventory/molecule_inventory.yml"
state: absent # Developer must implement.

View File

@ -0,0 +1,8 @@
---
driver:
name: default
platforms:
- name: instance
# you might want to add your own variables here based on what provisioning
# you are doing like:
# image: quay.io/centos/centos:stream8

View File

@ -0,0 +1,2 @@
collections:
- community.general

View File

@ -1,8 +1,17 @@
- import_tasks: include-vars.yml
- name: Install podman, podman networking plugins, and python support packages
vars:
dnf_packages:
- 'openssh-server'
- 'podman'
- 'podman-plugins'
- 'systemd-container'
- 'containernetworking-plugins'
- 'python3-pip'
- 'python3-policycoreutils'
dnf:
name: ['podman', 'containernetworking-plugins', 'podman-plugins', 'python3-pip', 'systemd-container']
name: "{{ dnf_packages }}"
state: present
- name: Install podman-compose pip Package
@ -21,6 +30,7 @@
- "{{ service_users }}"
- name: Create service folders
become: yes
become_user: "{{ item.0.name }}"
file:
path: "/home/{{ item.0.name }}/{{ item.1 }}"
@ -101,8 +111,7 @@
owner: root
group: root
mode: 0644
tags:
- 'molecule-notest'
when: '"molecule" not in group_names'
- lineinfile:
path: /etc/hosts
@ -111,8 +120,7 @@
owner: root
group: root
mode: 0644
tags:
- 'molecule-notest'
when: '"molecule" not in group_names'
# - name: Copy cni networking driver config into place
# blockinfile:
# name: "/etc/cni/net.d/podman.conflist"