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

Rhel9 milvus #2

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
6 changes: 4 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# to define environment variables available to docker-compose.yml

IMAGE_REPO=milvusdb
# If this is uncommented it will pull and not rebuild
# IMAGE_REPO=quay.io/grpereir
IMAGE_REPO=quay.io/ai-lab
IMAGE_ARCH=amd64
OS_NAME=ubuntu20.04
OS_NAME=rhel9

# for services.builder.image in docker-compose.yml
DATE_VERSION=20240520-d27db99
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/ai-lab-remote-rhel-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: AI-lab remove rhel-build

on:
workflow_dispatch:

pull_request:
branches:
- master
paths:
- 'build/docker/builder/cpu/rhel9/**'
- '.github/workflows/ai-lab-remote-rhel-build.yaml'

env:
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_vpc_id: ${{ secrets.VPC_ID }}
TF_VAR_rh_access: ${{ secrets.RH_ACCESS }}
TF_VAR_rh_org: ${{ secrets.RH_ORG }}
TF_VAR_ami_id: ${{ secrets.AMI_ID }}

jobs:
rhel9-milvus:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
max-parallel: 1
steps:
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: "1.7.5"

- name: Checkout code on runner
uses: actions/[email protected]

- name: sshkeygen for ansible
run: ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N ""

- name: Terraform Init
run: terraform init

- name: Terraform Apply
run: terraform apply -auto-approve

- name: Set up Python on runner
uses: actions/[email protected]
with:
python-version: '3.11'

- name: Install Ansible on runner
run: |
python3 -m pip install --upgrade pip
pip install ansible

# currently no reqs
# - name: Ansible Collections
# working-directory: build/ci/rhel-ansible
# run: ansible-galaxy install -r requirements.yaml

- name: Install jq and build inventory on runner
run: |
sudo apt-get install -y jq
PUBLIC_IP=$(terraform output -json | jq -r '.public_ip.value')
# PUBLIC_IP=$(terraform output -json | jq -r '.public_ip.value' | cut -d "\"" -f 2)
echo "public_ip=$PUBLIC_IP" >> $GITHUB_OUTPUT
echo "[test_environments]" > build/ci/rhel-ansible/inventory.ini
echo "test_environment_host ansible_host=${PUBLIC_IP}" >> build/ci/rhel-ansible/inventory.ini
# cat build/ci/rhel-ansible/inventory.ini

- name: Setup tmate session
# if: ${{ failure() }}
uses: mxschmitt/[email protected]
timeout-minutes: 25
with:
detached: true
limit-access-to-actor: true

- name: Provision runner to ec2
working-directory: build/ci/rhel-ansible
run: |
ansible-playbook -vv playbook.yaml \
-i inventory.ini \
--private-key=/home/runner/.ssh/id_rsa \
--extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \
--extra-vars "registry_pass=${{ secrets.REGISTRY_PASS }}" \
--extra-vars "subman_user=${{ secrets.SUBMAN_USER }}" \
--extra-vars "subman_pass=${{ secrets.SUBMAN_PASS }}"
env:
ANSIBLE_CONFIG: ansible.cfg

- name: Terraform Destroy
if: always()
run: terraform destroy -auto-approve

# For stacked runs of CI with concurrency allow for destroy to work
- name: Wait for 30 seconds for destroy to work
if: always()
run: sleep 30
67 changes: 0 additions & 67 deletions .github/workflows/all-contributors.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/bump-version.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/check-issue.yaml

This file was deleted.

Loading
Loading