mirror of
https://github.com/Expand-sys/awx-on-k3s
synced 2025-12-16 14:02:15 +11:00
Merge pull request #143 from kurokobo/galaxy
feat: update guide for galaxy installation
This commit is contained in:
commit
b551d1c4a3
2 changed files with 29 additions and 16 deletions
|
|
@ -82,15 +82,16 @@ docker run --detach \
|
||||||
pulp/pulp-galaxy-ng:latest
|
pulp/pulp-galaxy-ng:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Once it has started, load the initial configuration file.
|
Once it has started, reset the `admin` password.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
DATA_FIXTURE_URL="https://raw.githubusercontent.com/ansible/galaxy_ng/master/dev/automation-hub/initial_data.json"
|
$ docker exec -it pulp bash -c 'pulpcore-manager reset-admin-password'
|
||||||
curl $DATA_FIXTURE_URL | docker exec -i pulp bash -c "cat > /tmp/initial_data.json"
|
Please enter new password for user "admin":
|
||||||
docker exec pulp bash -c "/usr/local/bin/pulpcore-manager loaddata /tmp/initial_data.json"
|
Please enter new password for user "admin" again:
|
||||||
|
Successfully set password for "admin" user.
|
||||||
```
|
```
|
||||||
|
|
||||||
Now your own Galaxy NG is available at `http://$(hostname):8080/`. You can log in to the GUI by user `admin` with password `admin`.
|
Now your own Galaxy NG is available at `http://$(hostname):8080/`. You can log in to the GUI by user `admin` with password you reset.
|
||||||
|
|
||||||
## Deploy on Kubernetes (All-in-One Container)
|
## Deploy on Kubernetes (All-in-One Container)
|
||||||
|
|
||||||
|
|
@ -98,11 +99,19 @@ In this step, we will run the above All-in-One container on Kubernetes.
|
||||||
|
|
||||||
### Preparation
|
### Preparation
|
||||||
|
|
||||||
|
Clone this repository and change directory.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd ~
|
||||||
|
git clone https://github.com/kurokobo/awx-on-k3s.git
|
||||||
|
cd awx-on-k3s/galaxy
|
||||||
|
```
|
||||||
|
|
||||||
Generate a Self-Signed Certificate. Note that IP address can't be specified.
|
Generate a Self-Signed Certificate. Note that IP address can't be specified.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GALAXY_HOST="galaxy.example.com"
|
GALAXY_HOST="galaxy.example.com"
|
||||||
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./galaxy/all-in-one/tls.crt -keyout ./galaxy/all-in-one/tls.key -subj "/CN=${GALAXY_HOST}/O=${GALAXY_HOST}" -addext "subjectAltName = DNS:${GALAXY_HOST}"
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -out ./all-in-one/tls.crt -keyout ./all-in-one/tls.key -subj "/CN=${GALAXY_HOST}/O=${GALAXY_HOST}" -addext "subjectAltName = DNS:${GALAXY_HOST}"
|
||||||
```
|
```
|
||||||
|
|
||||||
Modify `hosts` and `host` in `all-in-one/ingress.yaml`.
|
Modify `hosts` and `host` in `all-in-one/ingress.yaml`.
|
||||||
|
|
@ -140,7 +149,7 @@ sudo mkdir -p /data/galaxy
|
||||||
Deploy Galaxy NG.
|
Deploy Galaxy NG.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -k galaxy/all-in-one
|
kubectl apply -k all-in-one
|
||||||
```
|
```
|
||||||
|
|
||||||
Required resources has been deployed in `galaxy` namespace.
|
Required resources has been deployed in `galaxy` namespace.
|
||||||
|
|
@ -162,16 +171,17 @@ replicaset.apps/galaxy-78df96fc64 1 1 1 53s
|
||||||
|
|
||||||
### Initial Configuration
|
### Initial Configuration
|
||||||
|
|
||||||
Once it has started, load the initial configuration file.
|
Once it has started, reset the `admin` password.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
POD_NAME=$(kubectl -n galaxy get pod -l app=galaxy -o name)
|
$ POD_NAME=$(kubectl -n galaxy get pod -l app=galaxy -o name)
|
||||||
DATA_FIXTURE_URL="https://raw.githubusercontent.com/ansible/galaxy_ng/master/dev/automation-hub/initial_data.json"
|
$ kubectl -n galaxy exec -it $POD_NAME -- bash -c 'pulpcore-manager reset-admin-password'
|
||||||
curl $DATA_FIXTURE_URL | kubectl -n galaxy exec -i $POD_NAME -- bash -c "cat > /tmp/initial_data.json"
|
Please enter new password for user "admin":
|
||||||
kubectl -n galaxy exec -i $POD_NAME -- bash -c "/usr/local/bin/pulpcore-manager loaddata /tmp/initial_data.json"
|
Please enter new password for user "admin" again:
|
||||||
|
Successfully set password for "admin" user.
|
||||||
```
|
```
|
||||||
|
|
||||||
Now Galaxy NG is available at `https://galaxy.example.com/` or the hostname you specified. You can log in to the GUI by user `admin` with password `admin`.
|
Now Galaxy NG is available at `https://galaxy.example.com/` or the hostname you specified. You can log in to the GUI by user `admin` with password you reset.
|
||||||
|
|
||||||
## Deploy on Kubernetes (Pulp Operator)
|
## Deploy on Kubernetes (Pulp Operator)
|
||||||
|
|
||||||
|
|
@ -448,8 +458,13 @@ cat <<EOF > sample_role/tasks/main.yml
|
||||||
msg: "World"
|
msg: "World"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Build tarball
|
# Create CHANGELOG.rst
|
||||||
|
# You can install antsibull-changelog by "pip install antsibull-changelog"
|
||||||
cd ../
|
cd ../
|
||||||
|
antsibull-changelog init .
|
||||||
|
antsibull-changelog release
|
||||||
|
|
||||||
|
# Build tarball
|
||||||
ansible-galaxy collection build
|
ansible-galaxy collection build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,6 @@ spec:
|
||||||
file_storage_size: 8Gi
|
file_storage_size: 8Gi
|
||||||
|
|
||||||
pulp_settings:
|
pulp_settings:
|
||||||
GALAXY_FEATURE_FLAGS:
|
|
||||||
execution_environments: "True"
|
|
||||||
TOKEN_AUTH_DISABLED: "True"
|
TOKEN_AUTH_DISABLED: "True"
|
||||||
|
|
||||||
api:
|
api:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue