From bfeae94106c8f1eb12890c496dfabe6ba2335ef7 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Fri, 16 Sep 2022 20:51:43 -0400 Subject: [PATCH 01/23] init --- .github/workflows/stale.yml | 27 ++++++++++++++++++++++++++ executionenv/execution-environment.yml | 9 +++++++++ executionenv/requirements.txt | 0 executionenv/requirements.yml | 4 ++++ 4 files changed, 40 insertions(+) create mode 100644 .github/workflows/stale.yml create mode 100644 executionenv/execution-environment.yml create mode 100644 executionenv/requirements.txt create mode 100644 executionenv/requirements.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..d02e00c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '45 11 * * *' + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' \ No newline at end of file diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml new file mode 100644 index 0000000..373992a --- /dev/null +++ b/executionenv/execution-environment.yml @@ -0,0 +1,9 @@ +--- +version: 1 + +build_arg_defaults: + EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-supported-rhel8' + +dependencies: + galaxy: requirements.yml + python: requirements.txt diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/executionenv/requirements.yml b/executionenv/requirements.yml new file mode 100644 index 0000000..87bfd22 --- /dev/null +++ b/executionenv/requirements.yml @@ -0,0 +1,4 @@ +--- +collections: + - name: community.aws + - name: azure.azcollection \ No newline at end of file From 3a2bebc310197eb57dd58ebbcfef7dd8c2ed6d1e Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 18:20:26 -0500 Subject: [PATCH 02/23] Requirements --- .DS_Store | Bin 0 -> 6148 bytes executionenv/requirements.txt | 7 +++++++ executionenv/requirements.yml | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..144ba5c1dc3b9a02f7af1a0bfa053232f834517d GIT binary patch literal 6148 zcmeHKO>5gg5S?|LS|Ta<&_FJQg@tc7U)VP@R;lGS`> z6)5Z+6DlbuO^Sv~)tq>U3Yd4dj<@v{en!{dpQ6jdLZ79DPElh%kbU^pZ)=F|;HA^? zh3EZDFN%CzM$s=(TdA);X#|a6EjUd+>uFLB%E`Dh7#*A5JFScKDjuZo^Wn7Le0HE! zImp#;WC?jTM9ImATxELN(G!)8EjMukK^TPn=H_g+yW4KbohX{Ov zpf%9F7ItiWSX!0ZnaZZP&( zIkZ~`8hZr*){(Y`*!(IQj`SFNtQ=wlCL9&$sKQ?{grg%beO>Iaa_HzJ{N+RVCkuZ= z5%%erU)pjKu|sZI0ajp9ffd(nn)APR`~82B#64Dk6?jw%h Date: Tue, 15 Nov 2022 18:20:52 -0500 Subject: [PATCH 03/23] Init build file --- .github/workflows/ee-build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/ee-build.yml diff --git a/.github/workflows/ee-build.yml b/.github/workflows/ee-build.yml new file mode 100644 index 0000000..e69de29 From fccd1421a66d789433d0d3ae5fb1e8a6c208ff4b Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 20:26:08 -0500 Subject: [PATCH 04/23] ee stuff --- executionenv/execution-environment.yml | 6 +++++- executionenv/requirements.txt | 26 +++++++++++++++++++------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index 373992a..1325b6f 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -2,8 +2,12 @@ version: 1 build_arg_defaults: - EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-supported-rhel8' + EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-minimal-rhel8' dependencies: galaxy: requirements.yml python: requirements.txt + +additional_build_steps: + append: + - RUN microdnf install gcc python3-devel krb5-devel krb5-workstation python-devel \ No newline at end of file diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt index 37a8c0a..4c911ff 100644 --- a/executionenv/requirements.txt +++ b/executionenv/requirements.txt @@ -1,7 +1,19 @@ -ansible==5.3.0 -ansible-runner==2.1.1 -kubernetes==22.6.0 -jmespath==0.10.0 -boto3==1.21.0 -# Hashicorp vault lookup -hvac==0.11.2 \ No newline at end of file +# Ansible Requirements +ansible==6.6.0 +ansible-runner==2.3.1 + +jmespath>=1.0.0 + +# Hashicorp vault +hvac==0.11.2 + +# AWS +botocore>=1.18.0 +boto3>=1.15.0 +boto>=2.49.0 + +# Azure +azure-cli>=2.42.0 + +# Windows things +pywinrm[kerberos]==0.4.3 \ No newline at end of file From cb14c6ff8bdfe95e75625df0e3bcda1283a1ec38 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 20:38:38 -0500 Subject: [PATCH 05/23] Added some things --- .github/workflows/ee-build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ee-build.yml b/.github/workflows/ee-build.yml index e69de29..9536087 100644 --- a/.github/workflows/ee-build.yml +++ b/.github/workflows/ee-build.yml @@ -0,0 +1,14 @@ +name: Build & Publish EE + +on: + push: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + ee-build: + runs-on: ubuntu-latest + + ee-publish: + runs-on: ubuntu-latest \ No newline at end of file From 531708a3010c5f98db6929423692b2baecce27a9 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 20:38:58 -0500 Subject: [PATCH 06/23] Additional collections --- executionenv/requirements.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/executionenv/requirements.yml b/executionenv/requirements.yml index 04612fe..3142a43 100644 --- a/executionenv/requirements.yml +++ b/executionenv/requirements.yml @@ -5,4 +5,7 @@ collections: - name: ansible.windows - name: community.windows - name: ansible.general - - name: community.general \ No newline at end of file + - name: community.general + - name: ansible.utils + - name: ansible.posix + - name: amazon.aws From 443a23446f61179a5851a9d02e93d40a83c363b4 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 20:39:18 -0500 Subject: [PATCH 07/23] EE --- executionenv/requirements.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt index 4c911ff..7dc1bc6 100644 --- a/executionenv/requirements.txt +++ b/executionenv/requirements.txt @@ -1,19 +1,21 @@ # Ansible Requirements -ansible==6.6.0 -ansible-runner==2.3.1 +ansible +ansible-runner -jmespath>=1.0.0 +cryptography +simplejson +jmespath # Hashicorp vault -hvac==0.11.2 +hvac # AWS -botocore>=1.18.0 -boto3>=1.15.0 -boto>=2.49.0 +botocore +boto3 +boto # Azure -azure-cli>=2.42.0 +azure-cli # Windows things -pywinrm[kerberos]==0.4.3 \ No newline at end of file +pywinrm[kerberos] From 659a6a96adbc7f079f7aeb904009955bf0215d48 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Tue, 15 Nov 2022 20:39:28 -0500 Subject: [PATCH 08/23] EE --- executionenv/bindep.txt | 2 ++ executionenv/execution-environment.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 executionenv/bindep.txt diff --git a/executionenv/bindep.txt b/executionenv/bindep.txt new file mode 100644 index 0000000..9f482b9 --- /dev/null +++ b/executionenv/bindep.txt @@ -0,0 +1,2 @@ +unzip +dnf \ No newline at end of file diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index 1325b6f..c56f099 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -2,12 +2,12 @@ version: 1 build_arg_defaults: - EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-21/ee-minimal-rhel8' + EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' dependencies: galaxy: requirements.yml python: requirements.txt additional_build_steps: - append: + prepend: - RUN microdnf install gcc python3-devel krb5-devel krb5-workstation python-devel \ No newline at end of file From 58c59f25895d3c1f43e0dd323912d879e12a9d97 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:08:55 -0500 Subject: [PATCH 09/23] Dockerfile to add label --- executionenv/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 executionenv/Dockerfile diff --git a/executionenv/Dockerfile b/executionenv/Dockerfile new file mode 100644 index 0000000..e53464b --- /dev/null +++ b/executionenv/Dockerfile @@ -0,0 +1,3 @@ +FROM dvo_ee + +LABEL org.opencontainers.image.source="https://github.com/devopsvalhalla/dvo-ee" \ No newline at end of file From a5ff380e52aa69b6f2c57f4b2235c8767e15443c Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:09:03 -0500 Subject: [PATCH 10/23] Updated ee code --- executionenv/execution-environment.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index c56f099..f1bd587 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -4,10 +4,15 @@ version: 1 build_arg_defaults: EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' +ansible_config: 'ansible.cfg' + dependencies: galaxy: requirements.yml python: requirements.txt additional_build_steps: prepend: - - RUN microdnf install gcc python3-devel krb5-devel krb5-workstation python-devel \ No newline at end of file + - RUN microdnf install gcc python3-devel krb5-devel krb5-workstation python-devel dnf-plugins-core + append: + - RUN microdnf config-manager --add-repo https://rpm.releases.hashicorp.com/v1.3.7/hashicorp.repo + - RUN microdnf install terraform \ No newline at end of file From db4ac7453a1ec9d6f974eb42430cd84278c696b8 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:10:26 -0500 Subject: [PATCH 11/23] Updated action --- .github/workflows/ee-build.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ee-build.yml b/.github/workflows/ee-build.yml index 9536087..3804d9f 100644 --- a/.github/workflows/ee-build.yml +++ b/.github/workflows/ee-build.yml @@ -9,6 +9,26 @@ on: jobs: ee-build: runs-on: ubuntu-latest + defaults: + run: + working-directory: "executionenv/" - ee-publish: - runs-on: ubuntu-latest \ No newline at end of file + steps: + - name: Checkout repo + uses: actions/checkout@master + + - name: Build Image + run: ansible-builder build --tag dov_ee + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: Tag Image + run: docker build -t ghcr.io/devopsvalhalla/dov_ee:latest + + - name: Publish Image + run: docker push ghcr.io/devopsvalhalla/dov_ee:latest \ No newline at end of file From 554759040a2100380aa1eb843dd6c6fbfc041ea3 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:11:37 -0500 Subject: [PATCH 12/23] Added pywinrm --- executionenv/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt index 7dc1bc6..88b3644 100644 --- a/executionenv/requirements.txt +++ b/executionenv/requirements.txt @@ -18,4 +18,5 @@ boto azure-cli # Windows things +pywinrm pywinrm[kerberos] From 49a050ea9480a16847ae10c7cd3880e79bc8b6f8 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:24:49 -0500 Subject: [PATCH 13/23] Update documentation --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 586752f..2dde8c2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,16 @@ # dvo-ee + DevOps Valhalla Ansible Execution Environment + +## Installed Software + +[Python Packages](/executionenv/requirements.txt) +[Ansible Collection](/executionenv/requirements.yml) + +## License + +[LICENSE](/LICENSE) + +## Disclaimer + +The code in this repository is provided as-is, and is not intended to be used in a producton environment. From 179a1a97f1d45cb0528000d2fdfa4b98217283cf Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:25:05 -0500 Subject: [PATCH 14/23] Added gcloud and digital ocean --- executionenv/execution-environment.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index f1bd587..d72791d 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -15,4 +15,21 @@ additional_build_steps: - RUN microdnf install gcc python3-devel krb5-devel krb5-workstation python-devel dnf-plugins-core append: - RUN microdnf config-manager --add-repo https://rpm.releases.hashicorp.com/v1.3.7/hashicorp.repo - - RUN microdnf install terraform \ No newline at end of file + - RUN microdnf install terraform + - RUN | + sudo tee -a /etc/yum.repos.d/google-cloud-sdk.repo << EOM + [google-cloud-cli] + name=Google Cloud CLI + baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64 + enabled=1 + gpgcheck=1 + repo_gpgcheck=0 + gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg + EOM + microdnf install google-cloud-cli + - RUN | + cd ~ + wget https://github.com/digitalocean/doctl/releases/download/v1.92.0/doctl-1.92.0-linux-amd64.tar.gz + tar xf ~/doctl-1.92.0-linux-amd64.tar.gz + mv ~/doctl /usr/local/bin + - RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ No newline at end of file From 5696d517f48e38182c0ad695578672659a7137e4 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:35:04 -0500 Subject: [PATCH 15/23] Added gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d79dfec --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/context/** \ No newline at end of file From 2ca2a8c134bab0900b9b5b02c4c1363bddbfdfc1 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 14:35:13 -0500 Subject: [PATCH 16/23] Removed cfg file --- executionenv/execution-environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index d72791d..eb00108 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -4,7 +4,7 @@ version: 1 build_arg_defaults: EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' -ansible_config: 'ansible.cfg' +# ansible_config: 'ansible.cfg' dependencies: galaxy: requirements.yml From 48b5f86656e1b52cf56033fdfa46590274422d94 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 15:01:18 -0500 Subject: [PATCH 17/23] Removed collection --- executionenv/requirements.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/executionenv/requirements.yml b/executionenv/requirements.yml index 3142a43..ca1071f 100644 --- a/executionenv/requirements.yml +++ b/executionenv/requirements.yml @@ -4,7 +4,6 @@ collections: - name: azure.azcollection - name: ansible.windows - name: community.windows - - name: ansible.general - name: community.general - name: ansible.utils - name: ansible.posix From f7429f12edef44ee438fd2e1f800a097ad7c410c Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 15:01:36 -0500 Subject: [PATCH 18/23] Switched image to quay --- executionenv/execution-environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index eb00108..9c97873 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -2,7 +2,8 @@ version: 1 build_arg_defaults: - EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' + # EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' + EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner' # ansible_config: 'ansible.cfg' From 2a7cafe1b8820a6d1caebdabf3e0badd8df3be8a Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 15:24:31 -0500 Subject: [PATCH 19/23] Updated gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d79dfec..ca158e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -**/context/** \ No newline at end of file +**/context** \ No newline at end of file From 91fdd67715c2d1172ea6a3ce3a52a510f229ce5c Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 15:46:44 -0500 Subject: [PATCH 20/23] Removed boto --- executionenv/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt index 88b3644..33a3728 100644 --- a/executionenv/requirements.txt +++ b/executionenv/requirements.txt @@ -12,7 +12,6 @@ hvac # AWS botocore boto3 -boto # Azure azure-cli From ad36b4403925bfadb5e830d84ebda823c8b18e06 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 16:21:36 -0500 Subject: [PATCH 21/23] Added cx_oracle --- executionenv/requirements.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt index 33a3728..1d84aa3 100644 --- a/executionenv/requirements.txt +++ b/executionenv/requirements.txt @@ -2,12 +2,13 @@ ansible ansible-runner +# Misc cryptography simplejson jmespath -# Hashicorp vault -hvac +# Hashicorp +hvac # Vault # AWS botocore @@ -19,3 +20,6 @@ azure-cli # Windows things pywinrm pywinrm[kerberos] + +# Oracle +cx_Oracle \ No newline at end of file From a22bdaea2982016ee987c4d81cc194d6ab960e22 Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 16:21:46 -0500 Subject: [PATCH 22/23] Removed RH repo --- executionenv/execution-environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/executionenv/execution-environment.yml b/executionenv/execution-environment.yml index 9c97873..5e0d946 100644 --- a/executionenv/execution-environment.yml +++ b/executionenv/execution-environment.yml @@ -2,7 +2,6 @@ version: 1 build_arg_defaults: - # EE_BASE_IMAGE: 'registry.redhat.io/ansible-automation-platform-22/ee-minimal-rhel8' EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner' # ansible_config: 'ansible.cfg' From becc0e0a7066cf8a81e00b79b0b78a1b35d7720a Mon Sep 17 00:00:00 2001 From: Trey Phillips Date: Thu, 26 Jan 2023 16:38:02 -0500 Subject: [PATCH 23/23] Spacing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2dde8c2..d96d510 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ DevOps Valhalla Ansible Execution Environment ## Installed Software -[Python Packages](/executionenv/requirements.txt) +[Python Packages](/executionenv/requirements.txt) [Ansible Collection](/executionenv/requirements.yml) ## License