From d7b7377be38824f51219184b81c973a493a4ce00 Mon Sep 17 00:00:00 2001 From: Guillem Hernandez Sola Date: Tue, 18 Nov 2025 08:43:03 +0100 Subject: [PATCH] Added all --- .gitignore | 46 +++++++++++++++++++ README.md | 41 +++++++++++++++++ Vagrantfile | 18 ++++++++ ansible_awx_install.txt | 97 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 202 insertions(+) create mode 100755 .gitignore create mode 100644 README.md create mode 100644 Vagrantfile create mode 100644 ansible_awx_install.txt diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..1f76a2f --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ + +# Created by https://www.gitignore.io/api/macos,vagrant,visualstudiocode + +### macOS ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Vagrant ### +.vagrant/ +*.box + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history + +### Ansible ### +*.retry + +# End of https://www.gitignore.io/api/macos,vagrant,visualstudiocode,ansible diff --git a/README.md b/README.md new file mode 100644 index 0000000..e8df11f --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +[![Agile611](https://www.agile611.com/wp-content/uploads/2020/09/cropped-logo-header.png)](http://www.agile611.com/) + +# Agile611 AWX Demo + +This repository contains the installation from AWX from . It uses Vagrant. + +## Requirements + +This repo uses a Vagrant box based on Ubuntu. + +## Example code + +Clone this repository with: + +```shell +git clone https://www.github.com/agile611/startusingawx.git +``` + +## Initial configuration + +* Start environment, we are going to need 4 ubuntu boxes (Ansible, Alfa, Bravo, Charlie) + +```shell +vagrant up +vagrant ssh awx +``` + + +## Support + +This tutorial is released into the public domain by Agile611 under WTFPL. + +[![WTFPL](http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-1.png)](http://www.wtfpl.net/) + +This README file was originally written by [Guillem Hernández Sola](https://www.linkedin.com/in/guillemhs/) and is likewise released into the public domain. + +Please contact Agile611 for further details. + +* Agile611 +* Laureà Miró 309 +* 08950 Esplugues de Llobregat (Barcelona) \ No newline at end of file diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..372d9eb --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,18 @@ +Vagrant.configure(2) do |config| + config.vm.define "awx" do |awx| + awx.vm.box = "bento/ubuntu-24.04" + awx.vm.network "private_network", ip: "192.168.10.50" + awx.vm.hostname = "awx" + #awx.vm.provision :shell, :path => "docker.sh" + #awx.vm.provision :shell, :path => "ansible.sh" + awx.vm.network "forwarded_port", guest: 80, host: 80 + awx.vm.network "forwarded_port", guest: 443, host: 443 + #awx.vm.network "forwarded_port", guest: 3000, host: 3000 + awx.vm.network "forwarded_port", guest: 8000, host: 8000 + awx.vm.network "forwarded_port", guest: 32000, host: 32000 + awx.vm.provider "virtualbox" do |vb| + vb.memory = "4096" + vb.cpus = "2" + end + end +end diff --git a/ansible_awx_install.txt b/ansible_awx_install.txt new file mode 100644 index 0000000..5b1123c --- /dev/null +++ b/ansible_awx_install.txt @@ -0,0 +1,97 @@ +== 1. Update Your System == +sudo apt update +sudo apt upgrade -y + +== 2. Install k3s == +curl -sfL https://get.k3s.io | sh - + +== 3. Give Non-root User Access to K3s Config == +sudo chown $USER:$USER /etc/rancher/k3s/k3s.yaml +export KUBECONFIG=/etc/rancher/k3s/k3s.yaml + +== 4. Verify Kubernetes Cluster == +kubectl version +kubectl get nodes +kubectl get pods -A + +== 5. Install Kustomize == +curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash +sudo mv kustomize /usr/local/bin + +== 6. Create Kustomization Directory == +mkdir awx-deploy && cd awx-deploy + +== 7. Create kustomization.yaml == +#create file +nano kustomization.yaml + +#Add below to the file +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - github.com/ansible/awx-operator/config/default?ref=2.19.1 + +images: + - name: quay.io/ansible/awx-operator + newTag: 2.19.1 + +namespace: awx + + +== 8. Apply Kustomize Configuration == +kubectl apply -k . + +OR + +kustomize build . | kubectl apply -f - + +== 9. Verify Operator is Running == +kubectl get pods -n awx + +== 10. Create AWX Instance. Create a file named awx-demo.yaml == +#create file +nano awx-demo.yaml + +#Add below to the file +--- +apiVersion: awx.ansible.com/v1beta1 +kind: AWX +metadata: + name: awx-demo +spec: + service_type: nodeport + nodeport_port: 32000 + +== 11. Add Instance to Kustomization == +# Update your kustomization.yaml to include awx-demo.yaml +#edit file +nano kustomization.yaml + +#add - awx-demo.yaml under resources +resources: + - github.com/ansible/awx-operator/config/default?ref=2.19.1 + - awx-demo.yaml + +images: + - name: quay.io/ansible/awx-operator + newTag: 2.19.1 + +namespace: awx + +== 12. Reapply Kustomize Configuration == +kubectl apply -k . + +== 13. Check POD Status +kubectl get pods -n awx + +== 14. View Logs == +kubectl logs -f deployment/awx-operator-controller-manager -c awx-manager -n awx + +== 15. Retrieve Admin Password == + kubectl get secret awx-demo-admin-password -n awx -o jsonpath="{.data.password}" | base64 --decode ; echo + + == 16. Access the AWX Dashboard == + http://:32000 + + #Username: admin + #Password: (from previous step) \ No newline at end of file