diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..144ba5c Binary files /dev/null and b/.DS_Store differ diff --git a/.github/workflows/ee-build.yml b/.github/workflows/ee-build.yml new file mode 100644 index 0000000..3804d9f --- /dev/null +++ b/.github/workflows/ee-build.yml @@ -0,0 +1,34 @@ +name: Build & Publish EE + +on: + push: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + ee-build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: "executionenv/" + + 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 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/.gitignore b/.gitignore new file mode 100644 index 0000000..ca158e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**/context** \ No newline at end of file diff --git a/README.md b/README.md index 586752f..d96d510 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. 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 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 new file mode 100644 index 0000000..5e0d946 --- /dev/null +++ b/executionenv/execution-environment.yml @@ -0,0 +1,35 @@ +--- +version: 1 + +build_arg_defaults: + EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner' + +# 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 dnf-plugins-core + append: + - RUN microdnf config-manager --add-repo https://rpm.releases.hashicorp.com/v1.3.7/hashicorp.repo + - 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 diff --git a/executionenv/requirements.txt b/executionenv/requirements.txt new file mode 100644 index 0000000..1d84aa3 --- /dev/null +++ b/executionenv/requirements.txt @@ -0,0 +1,25 @@ +# Ansible Requirements +ansible +ansible-runner + +# Misc +cryptography +simplejson +jmespath + +# Hashicorp +hvac # Vault + +# AWS +botocore +boto3 + +# Azure +azure-cli + +# Windows things +pywinrm +pywinrm[kerberos] + +# Oracle +cx_Oracle \ No newline at end of file diff --git a/executionenv/requirements.yml b/executionenv/requirements.yml new file mode 100644 index 0000000..ca1071f --- /dev/null +++ b/executionenv/requirements.yml @@ -0,0 +1,10 @@ +--- +collections: + - name: community.aws + - name: azure.azcollection + - name: ansible.windows + - name: community.windows + - name: community.general + - name: ansible.utils + - name: ansible.posix + - name: amazon.aws