Skip to main content

AWX/AAP Crednetial Plugin for Github Apps

Was tested on AWX 23.5.1, but should work for newer versions with the plugin archtecture as both entry points are specified in the build.

Usage

With the continerized version of AWX doing installation of the external packages needs to be done at container build time. The best method of doing this is to wrap the task and web containers in your own Dockerfile and install this package.

For testing pruposes you can use minikube to install the package directly inside the container.

  1. Get the pod names for both task and web
$ kubectl get pods

NAME                                               READY   STATUS    RESTARTS   AGE
awx-demo-postgres-13-0                             1/1     Running   0          6h1m
awx-demo-task-6d856db85-8ph5s                      4/4     Running   0          4h45m
awx-demo-web-94554596f-d87k4                       3/3     Running   0          4h45m
awx-operator-controller-manager-6c5879f7c5-jcblw   2/2     Running   0          4h45m
  1. Get the container ID for the awx-demo-task (or whatever you named it) container
$ kubectl get pods awx-demo-task-6d856db85-8ph5s -o yaml

...
      readOnly: true
      recursiveReadOnly: Disabled
  - containerID: docker://0ba17fd042ef828c88573d20f19f4e51af85e913fe28afab1f04344a8142c7ea
    image: quay.io/ansible/awx:23.5.1
    imageID: docker-pullable://quay.io/ansible/awx@sha256:2d24fe9572852a1497c3c2514e6554cb4c6f01e9bfc775f5168ef53753f33248
    lastState: {}
    name: awx-demo-task
    ready: true
    restartCount: 0
...
  1. Get the container ID for the awx-demo-web (or whatever you named it) container
$ kubectl get pods awx-demo-web-94554596f-d87k4 -o yaml

...
      readOnly: true
      recursiveReadOnly: Disabled
  - containerID: docker://cbfcb587d00f64498f069ce4fe3358af14d545dc07e73fe88c5b87293e477cee
    image: quay.io/ansible/awx:23.5.1
    imageID: docker-pullable://quay.io/ansible/awx@sha256:2d24fe9572852a1497c3c2514e6554cb4c6f01e9bfc775f5168ef53753f33248
    lastState: {}
    name: awx-demo-web
    ready: true
    restartCount: 0
...
  1. SSH into the minikube box
$ minikube ssh
docker@minikube:~$ 
  1. Log into task container as root with the container ID
docker@minikube:~$ docker exec -it -u0 0ba17fd042ef828c88573d20f19f4e51af85e913fe28afab1f04344a8142c7ea /bin/bash
bash-5.1# 
  1. Install the credential plugin
bash-5.1# /var/lib/awx/venv/awx/bin/pip3 install -U awx-plugin-credential-github
...
  1. Log into task container as root with the container ID
docker@minikube:~$ docker exec -it -u0 cbfcb587d00f64498f069ce4fe3358af14d545dc07e73fe88c5b87293e477cee /bin/bash
bash-5.1# 
  1. Install the credential plugin
bash-5.1# /var/lib/awx/venv/awx/bin/pip3 install -U awx-plugin-credential-github
...
  1. Update AWX
bash-5.1# awx-manage setup_managed_credential_types
  1. Restart the task container
docker@minikube:~$ docker restart 0ba17fd042ef828c88573d20f19f4e51af85e913fe28afab1f04344a8142c7ea
  1. Restart the web contianer
docker@minikube:~$ docker restart cbfcb587d00f64498f069ce4fe3358af14d545dc07e73fe88c5b87293e477cee

You should now be able to use the plugin in AWX.

Metadata

Release files for awx-plugin-credential-github 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for awx-plugin-credential-github 1.0.0
File Size Uploaded
awx_plugin_credential_github-1.0.0.tar.gz 30.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for awx-plugin-credential-github 1.0.0
File Interpreter ABI Platform
awx_plugin_credential_github-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.6 kB

Release files / awx_plugin_credential_github-1.0.0.tar.gz

Download URL awx_plugin_credential_github-1.0.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d6e22f5540c53ce69b8bb070ec14b355ab512b7477c2bd9c5111575bc16000c3
BLAKE2b-256 checksum
How to use checksums
325db1a3a4b8d021c9b98e7d01e53e843d2c31c5377c352914b1fec3d13c6514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release files / awx_plugin_credential_github-1.0.0-py3-none-any.whl

Download URL awx_plugin_credential_github-1.0.0-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4c2341065374edc3061651d95291b2ea3f37b63a72eb3c0e32ce83e13efee39
BLAKE2b-256 checksum
How to use checksums
cfadde1c990f6981562876a7c5b6f5dd276a36c92d9cc4e5ee7b7572cc328579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page