Commit 82b7f62f authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

chore: keep Release 2 only, remove the Release 1 stack

The Release 1 automation had gone stale and nothing in Release 2 uses
it. Removed (142 files, about 10.7k lines):
- scenarios all_in_one, full_oop, dual_oop, full_oop_existing_cluster
  and every playbook under playbooks/tools
- roles artefact-manager, demas, homer, i2edge, lite2edge, kind-cluster,
  node-feature-discovery, prometheus, zot, and the MongoDB-era
  federation-manager, oeg and srm
- the kind, Prometheus, node-feature-discovery and prerequisites
  infrastructure playbooks
- inventory group_vars, profiles, hosts.yml and
  local_kubeconfig_execution.yml, secrets.example.yml,
  test-template.yml
- docker-local-deployment/
- docs/ and mkdocs.yml: the Release 1 guide, published to its own Pages
  site; user guides belong on the Open OP documentation site

What stays: roles k3s, helm and oop-platform, the k3s and
r2_existing_cluster playbooks, tests/r2_e2e and role-template. The
READMEs, CONTRIBUTING and roles/README.md describe only that now.

CI: syntax-check runs every k3s and r2_existing_cluster playbook against
inventory/r2.example.yml; python-smoke compiles fm_partners.py and the
e2e tests; the docs and pages jobs are gone. ansible.cfg no longer
defaults to the removed hosts.yml, so every run names its inventory.
community.docker, community.general and the docker pip package are
dropped: nothing left uses them.

Release 1 stays at tag r1-final (master before Release 2).

Validation: yamllint, ansible-lint (production profile, 0 findings) and
--syntax-check of all six playbooks pass on the result.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 7cc17c92
Loading
Loading
Loading
Loading
Loading
+0 −2
Changes for .ansible-lint: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -5,9 +5,7 @@ exclude_paths:
  - .gitlab-ci-local/
  - .mypy_cache/
  - .venv/
  - ansible/secrets.yml
  - ansible/venv/
  - public/
  - venv/
skip_list:
  - var-naming
+0 −12
Changes for .gitignore: 0 added lines, 12 removed lines.
Original line number Diff line number Diff line
# Python virtual environments
venv/
ansible/venv/
docs/.venv/
.venv/
__pycache__/
*.pyc
@@ -13,15 +12,8 @@ ansible/.ansible/
.ansible/
*.retry
ansible_facts/
ansible/secrets.yml
ansible/inventory/*.local.yml

# Automation folder - contains kubeconfig files generated by ansible
automation/

# Generated kubeconfig files
**/operator-platform-external-kubeconfig.yaml

# IDE
.vscode/
.idea/
@@ -42,7 +34,3 @@ Thumbs.db

# CI/CD
.gitlab-ci-local/

# MkDocs build output
public/
site/
+7 −35
Changes for .gitlab-ci.yml: 7 added lines, 35 removed lines.
Original line number Diff line number Diff line
@@ -3,8 +3,6 @@ image: python:3.12-slim
stages:
  - lint
  - test
  - docs
  - deploy

variables:
  ANSIBLE_CONFIG: ansible/ansible.cfg
@@ -31,12 +29,12 @@ secret-scan:
    - apk add --no-cache git
  script:
    - |
      if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- . ':!ansible/secrets.example.yml'; then
      if git grep -nE 'g[l]pat-|g[h]p_|github_[p]at_' -- .; then
        exit 1
      fi
      begin_marker='-----BEGIN '
      key_marker='PRIVATE KEY'
      if git grep -n -e "$begin_marker" -- . ':!ansible/secrets.example.yml' | grep -E "$key_marker"; then
      if git grep -n -e "$begin_marker" -- . | grep -E "$key_marker"; then
        exit 1
      fi

@@ -58,38 +56,12 @@ syntax-check:
  script:
    - cd ansible
    - chmod 700 .
    - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop/deploy-kubernetes.yml
    - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/dual_oop/deploy-kubernetes.yml
    - ansible-playbook -i inventory/hosts.yml --syntax-check playbooks/scenarios/full_oop_existing_cluster/deploy.yml
    - |
      for playbook in playbooks/infrastructure/k3s/*.yml playbooks/scenarios/r2_existing_cluster/*.yml; do
        ansible-playbook -i inventory/r2.example.yml --syntax-check "$playbook"
      done

python-smoke:
  stage: test
  script:
    - python3 -m py_compile docker-local-deployment/prepare_kubeconfig.py

docs:
  stage: docs
  script:
    - python3 --version
    - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; }
    - pip install --upgrade pip
    - pip install -r docs/requirements.txt
    - mkdocs build --strict
  artifacts:
    paths:
      - public
    expire_in: 1 week

pages:
  stage: deploy
  script:
    - python3 --version
    - pip --version 2>/dev/null || { python3 -m venv --without-pip .venv && source .venv/bin/activate && curl -sS https://bootstrap.pypa.io/get-pip.py | python3; }
    - pip install --upgrade pip
    - pip install -r docs/requirements.txt
    - mkdocs build --strict
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
    - python3 -m py_compile ansible/roles/oop-platform/files/fm_partners.py ansible/tests/r2_e2e/*.py
+0 −2
Changes for .yamllint: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -7,9 +7,7 @@ ignore: |
  .gitlab-ci-local/
  .mypy_cache/
  .venv/
  ansible/secrets.yml
  ansible/venv/
  public/
  venv/

rules:
+9 −6
Changes for CONTRIBUTING.md: 9 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -104,17 +104,20 @@ This repository adheres to the following coding standards for consistency:
Before opening a PR, ensure your changes are working correctly:

1. **Set Up Test Environment**:
   - Ensure all required dependencies are installed.
   - Use a local Kubernetes (e.g., Kind) environment to test deployments.
   - Two or more operators, each with its own Kubernetes cluster (k3s on VMs works:
     `playbooks/infrastructure/k3s/deploy.yml`), in an inventory based on
     `inventory/r2.example.yml`.

2. **Run Playbook Tests**:
   - Example:
2. **Run the Scenario and its Tests**:
   ```bash
     ansible-playbook playbooks/scenarios/all_in_one/deploy.yml -e @secrets.yml
   ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/deploy.yml
   ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/federate.yml
   ansible-playbook -i inventory/r2.local.yml playbooks/scenarios/r2_existing_cluster/e2e.yml
   ```
   Run `deploy.yml` and `federate.yml` twice: the second run must report no changes.

3. **Verify Cleanup**:
   - Set `state: absent` and ensure components undeploy cleanly.
   - `undeploy.yml` removes the release and keeps the key Secrets and database volume.

4. **Run Ansible Lint**:
   ```bash
Loading