Added all
This commit is contained in:
46
.gitignore
vendored
Executable file
46
.gitignore
vendored
Executable file
@@ -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
|
||||
41
README.md
Normal file
41
README.md
Normal file
@@ -0,0 +1,41 @@
|
||||
[](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.
|
||||
|
||||
[](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)
|
||||
18
Vagrantfile
vendored
Normal file
18
Vagrantfile
vendored
Normal file
@@ -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
|
||||
97
ansible_awx_install.txt
Normal file
97
ansible_awx_install.txt
Normal file
@@ -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://<your-server-ip>:32000
|
||||
|
||||
#Username: admin
|
||||
#Password: (from previous step)
|
||||
Reference in New Issue
Block a user