mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-27 05:43:11 +00:00
Compare commits
26 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31e1914db6 | ||
|
|
aee1b464ed | ||
|
|
61921d40ed | ||
|
|
b5f2c19470 | ||
|
|
8d91a67078 | ||
|
|
3df613346c | ||
|
|
b559e836e4 | ||
|
|
ea5fb823f9 | ||
|
|
4c5429190c | ||
|
|
22a05e8887 | ||
|
|
7012a6acfc | ||
|
|
1dc64b551c | ||
|
|
c949d6e58d | ||
|
|
0e0f413e82 | ||
|
|
7935873746 | ||
|
|
a57b9e0475 | ||
|
|
39eee1370b | ||
|
|
48dcb08c78 | ||
|
|
d60fddebca | ||
|
|
ffd1a4b2ab | ||
|
|
8391ed3501 | ||
|
|
3b2a218419 | ||
|
|
71362dd3d4 | ||
|
|
3188cd2889 | ||
|
|
bf3965eac7 | ||
|
|
7953d424f0 |
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
@@ -18,9 +18,9 @@ jobs:
|
||||
env:
|
||||
DOCKER_API_VERSION: "1.41"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.8"
|
||||
|
||||
@@ -45,12 +45,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: helm
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Create k8s Kind Cluster
|
||||
uses: helm/kind-action@v1.2.0
|
||||
uses: helm/kind-action@v1.8.0
|
||||
|
||||
- name: Build operator image and load into kind
|
||||
run: |
|
||||
@@ -88,7 +88,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check no_log statements
|
||||
run: |
|
||||
|
||||
2
.github/workflows/devel.yaml
vendored
2
.github/workflows/devel.yaml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Push devel image
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build Image
|
||||
run: |
|
||||
|
||||
2
.github/workflows/label_issue.yml
vendored
2
.github/workflows/label_issue.yml
vendored
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label Issue - Community
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- name: Install python requests
|
||||
run: pip install requests
|
||||
|
||||
2
.github/workflows/label_pr.yml
vendored
2
.github/workflows/label_pr.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Label PR - Community
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- name: Install python requests
|
||||
run: pip install requests
|
||||
|
||||
4
.github/workflows/stage.yml
vendored
4
.github/workflows/stage.yml
vendored
@@ -38,13 +38,13 @@ jobs:
|
||||
exit 0
|
||||
|
||||
- name: Checkout awx
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/awx
|
||||
path: awx
|
||||
|
||||
- name: Checkout awx-operator
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/awx-operator
|
||||
path: awx-operator
|
||||
|
||||
17
.readthedocs.yml
Normal file
17
.readthedocs.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
# RTD API version
|
||||
version: 2
|
||||
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.11"
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: ./docs/requirements.txt
|
||||
8
Makefile
8
Makefile
@@ -334,6 +334,14 @@ helm-chart-generate: kustomize helm kubectl-slice yq charts
|
||||
for file in charts/$(CHART_NAME)/raw-files/*rolebinding*; do\
|
||||
$(YQ) -i '.subjects[0].namespace = "{{ .Release.Namespace }}"' $${file};\
|
||||
done
|
||||
# Correct .metadata.name for cluster scoped resources
|
||||
cluster_scoped_files="charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-metrics-reader.yaml charts/$(CHART_NAME)/raw-files/clusterrole-awx-operator-proxy-role.yaml";\
|
||||
for file in $${cluster_scoped_files}; do\
|
||||
$(YQ) -i '.metadata.name += "-{{ .Release.Name }}"' $${file};\
|
||||
done
|
||||
|
||||
# Correct the reference for the clusterrolebinding
|
||||
$(YQ) -i '.roleRef.name += "-{{ .Release.Name }}"' 'charts/$(CHART_NAME)/raw-files/clusterrolebinding-awx-operator-proxy-rolebinding.yaml'
|
||||
# move all custom resource definitions to crds folder
|
||||
mkdir charts/$(CHART_NAME)/crds
|
||||
mv charts/$(CHART_NAME)/raw-files/customresourcedefinition*.yaml charts/$(CHART_NAME)/crds/.
|
||||
|
||||
114
README.md
114
README.md
@@ -8,75 +8,78 @@
|
||||
|
||||
An [Ansible AWX](https://github.com/ansible/awx) operator for Kubernetes built with [Operator SDK](https://github.com/operator-framework/operator-sdk) and Ansible.
|
||||
|
||||
# Table of Contents
|
||||
<!-- Regenerate this table of contents using https://github.com/ekalinin/github-markdown-toc -->
|
||||
<!-- gh-md-toc --insert README.md -->
|
||||
<!--ts-->
|
||||
|
||||
NOTE: we are in the process of moving this readme into official docs in the /docs folder. Please go there to find additional sections during this interim move phase.
|
||||
**Note**: We are in the process of moving this readme into official docs in the /docs folder. Please go there to find additional sections during this interim move phase.
|
||||
|
||||
* [AWX Operator](#awx-operator)
|
||||
* [Table of Contents](#table-of-contents)
|
||||
* [Usage](#usage)
|
||||
* [Disable IPV6](#disable-ipv6)
|
||||
* [Add Execution Nodes](#adding-execution-nodes)
|
||||
* [Custom Receptor CA](#custom-receptor-ca)
|
||||
* [Contributing](#contributing)
|
||||
* [Release Process](#release-process)
|
||||
* [Author](#author)
|
||||
* [Code of Conduct](#code-of-conduct)
|
||||
* [Get Involved](#get-involved)
|
||||
|
||||
Table of Contents
|
||||
=================
|
||||
|
||||
- [AWX Operator](#awx-operator)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Install and Configuration](#install-and-configuration)
|
||||
- [Contributing](#contributing)
|
||||
- [Release Process](#release-process)
|
||||
- [Author](#author)
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [Get Involved](#get-involved)
|
||||
|
||||
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
||||
|
||||
<!--te-->
|
||||
|
||||
|
||||
### Disable IPV6
|
||||
Starting with AWX Operator release 0.24.0,[IPV6 was enabled in ngnix configuration](https://github.com/ansible/awx-operator/pull/950) which causes
|
||||
upgrades and installs to fail in environments where IPv6 is not allowed. Starting in 1.1.1 release, you can set the `ipv6_disabled` flag on the AWX
|
||||
spec. If you need to use an AWX operator version between 0.24.0 and 1.1.1 in an IPv6 disabled environment, it is suggested to enabled ipv6 on worker
|
||||
nodes.
|
||||
|
||||
In order to disable ipv6 on ngnix configuration (awx-web container), add following to the AWX spec.
|
||||
## Install and Configuration
|
||||
|
||||
The following variables are customizable
|
||||
All of our usage and configuration docs are nested in the `docs/` directory. Below is a Table of Contents for those.
|
||||
|
||||
| Name | Description | Default |
|
||||
| ------------- | ---------------------- | ------- |
|
||||
| ipv6_disabled | Flag to disable ipv6 | false |
|
||||
- Introduction
|
||||
- [Introduction](./docs/introduction/introduction.md)
|
||||
- Contributors Guide
|
||||
- [Code of Conduct](./docs/contributors-guide/code-of-conduct.md)
|
||||
- [Get Involved](./docs/contributors-guide/get-involved.md)
|
||||
- [Contributing](./docs/contributors-guide/contributing.md)
|
||||
- [Release Process](./docs/contributors-guide/release-process.md)
|
||||
- [Authors](./docs/contributors-guide/author.md)
|
||||
- Installation
|
||||
- [Basic Install](./docs/installation/basic-install.md)
|
||||
- [Creating a Minikube cluster for testing](./docs/installation/creating-a-minikube-cluster-for-testing.md)
|
||||
- [Helm Install](./docs/installation/helm-install-on-existing-cluster.md)
|
||||
- [Migration](./docs/migration/migration.md)
|
||||
- [Uninstall](./docs/uninstall/uninstall.md)
|
||||
- User Guide
|
||||
- [Admin User Configuration](./docs/user-guide/admin-user-account-configuration.md)
|
||||
- [Database Configuration](./docs/user-guide/database-configuration.md)
|
||||
- [Network and TLS Configuration](./docs/user-guide/network-and-tls-configuration.md)
|
||||
- Advanced Configuration
|
||||
- [No Log](./docs/user-guide/advanced-configuration/no-log.md)
|
||||
- [Deploy a Specific Version of AWX](./docs/user-guide/advanced-configuration/deploying-a-specific-version-of-awx.md)
|
||||
- [Resource Requirements](./docs/user-guide/advanced-configuration/containers-resource-requirements.md)
|
||||
- [Extra Settings](./docs/user-guide/advanced-configuration/extra-settings.md)
|
||||
- [Environment Variables](./docs/user-guide/advanced-configuration/exporting-environment-variables-to-containers.md)
|
||||
- [Custom Labels](./docs/user-guide/advanced-configuration/labeling-operator-managed-objects.md)
|
||||
- [Custom Volumes](./docs/user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md)
|
||||
- [Scaling Deployments](./docs/user-guide/advanced-configuration/scaling-the-web-and-task-pods-independently.md)
|
||||
- [Auto Update Upon Operator Upgrade](./docs/user-guide/advanced-configuration/auto-upgrade.md)
|
||||
- [Termination Grace Period](./docs/user-guide/advanced-configuration/pods-termination-grace-period.md)
|
||||
- [Node Selector for Deployments](./docs/user-guide/advanced-configuration/assigning-awx-pods-to-specific-nodes.md)
|
||||
- [Default EE from Private Registries](./docs/user-guide/advanced-configuration/default-execution-environments-from-private-registries.md)
|
||||
- [CSRF Cookie Secure](./docs/user-guide/advanced-configuration/csrf-cookie-secure-setting.md)
|
||||
- [Disable IPv6](./docs/user-guide/advanced-configuration/disable-ipv6.md)
|
||||
- [LDAP](./docs/user-guide/advanced-configuration/enabling-ldap-integration-at-awx-bootstrap.md)
|
||||
- [Priority Clases](./docs/user-guide/advanced-configuration/priority-classes.md)
|
||||
- [Priveleged Tasks](./docs/user-guide/advanced-configuration/privileged-tasks.md)
|
||||
- [Redis Container Capabilities](./docs/user-guide/advanced-configuration/redis-container-capabilities.md)
|
||||
- [Trusting a Custom Certificate Authority](./docs/user-guide/advanced-configuration/trusting-a-custom-certificate-authority.md)
|
||||
- [Service Account](./docs/user-guide/advanced-configuration/service-account.md)
|
||||
- [Persisting the Projects Directory](./docs/user-guide/advanced-configuration/persisting-projects-directory.md)
|
||||
- Troubleshooting
|
||||
- [General Debugging](./docs/troubleshooting/debugging.md)
|
||||
|
||||
```yaml
|
||||
spec:
|
||||
ipv6_disabled: true
|
||||
```
|
||||
|
||||
### Adding Execution Nodes
|
||||
Starting with AWX Operator v0.30.0 and AWX v21.7.0, standalone execution nodes can be added to your deployments.
|
||||
See [AWX execution nodes docs](https://github.com/ansible/awx/blob/devel/docs/execution_nodes.md) for information about this feature.
|
||||
|
||||
#### Custom Receptor CA
|
||||
The control nodes on the K8S cluster will communicate with execution nodes via mutual TLS TCP connections, running via Receptor.
|
||||
Execution nodes will verify incoming connections by ensuring the x509 certificate was issued by a trusted Certificate Authority (CA).
|
||||
|
||||
A user may wish to provide their own CA for this validation. If no CA is provided, AWX Operator will automatically generate one using OpenSSL.
|
||||
|
||||
Given custom `ca.crt` and `ca.key` stored locally, run the following,
|
||||
|
||||
```bash
|
||||
kubectl create secret tls awx-demo-receptor-ca \
|
||||
--cert=/path/to/ca.crt --key=/path/to/ca.key
|
||||
```
|
||||
|
||||
The secret should be named `{AWX Custom Resource name}-receptor-ca`. In the above the AWX CR name is "awx-demo". Please replace "awx-demo" with your AWX Custom Resource name.
|
||||
|
||||
If this secret is created after AWX is deployed, run the following to restart the deployment,
|
||||
|
||||
```bash
|
||||
kubectl rollout restart deployment awx-demo
|
||||
```
|
||||
|
||||
**Important Note**, changing the receptor CA will break connections to any existing execution nodes. These nodes will enter an `unavailable` state, and jobs will not be able to run on them. Users will need to download and re-run the install bundle for each execution node. This will replace the TLS certificate files with those signed by the new CA. The execution nodes should then appear in a `ready` state after a few minutes.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -105,5 +108,6 @@ We ask all of our community members and contributors to adhere to the [Ansible c
|
||||
|
||||
We welcome your feedback and ideas. The AWX operator uses the same mailing list and IRC channel as AWX itself. Here's how to reach us with feedback and questions:
|
||||
|
||||
- Join the `#ansible-awx` channel on irc.libera.chat
|
||||
- Join the [Ansible AWX channel on Matrix](https://matrix.to/#/#awx:ansible.com)
|
||||
- Join the [Ansible Community Forum](https://forum.ansible.com)
|
||||
- Join the [mailing list](https://groups.google.com/forum/#!forum/awx-project)
|
||||
|
||||
@@ -90,6 +90,9 @@ spec:
|
||||
postgres_image_version:
|
||||
description: PostgreSQL container image version to use
|
||||
type: string
|
||||
precreate_partition_hours:
|
||||
description: Number of hours worth of events table partitions to precreate before backup to avoid pg_dump locks.
|
||||
type: string
|
||||
image_pull_policy:
|
||||
description: The image pull policy
|
||||
type: string
|
||||
|
||||
@@ -63,21 +63,29 @@ spec:
|
||||
admin_password_secret:
|
||||
description: Secret where the admin password can be found
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,253}[a-zA-Z0-9]$'
|
||||
postgres_configuration_secret:
|
||||
description: Secret where the database configuration can be found
|
||||
type: string
|
||||
old_postgres_configuration_secret:
|
||||
description: Secret where the old database configuration can be found for data migration
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,253}[a-zA-Z0-9]$'
|
||||
postgres_label_selector:
|
||||
description: Label selector used to identify postgres pod for data migration
|
||||
type: string
|
||||
secret_key_secret:
|
||||
description: Secret where the secret key can be found
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,253}[a-zA-Z0-9]$'
|
||||
broadcast_websocket_secret:
|
||||
description: Secret where the broadcast websocket secret can be found
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[a-zA-Z0-9][-a-zA-Z0-9]{0,253}[a-zA-Z0-9]$'
|
||||
extra_volumes:
|
||||
description: Specify extra volumes to add to the application pod
|
||||
type: string
|
||||
|
||||
@@ -50,6 +50,12 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Precreate Partition Hours
|
||||
path: precreate_partition_hours
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:text
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:hidden
|
||||
- displayName: Database Backup Label Selector
|
||||
path: postgres_label_selector
|
||||
x-descriptors:
|
||||
@@ -75,6 +81,20 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Set default labels on AWX resource?
|
||||
path: set_self_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Additional labels defined on the resource, which should be propagated
|
||||
to child resources
|
||||
path: additional_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Node Selector for backup management pod
|
||||
path: db_management_pod_node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
statusDescriptors:
|
||||
- description: Persistent volume claim name used during backup
|
||||
displayName: Backup Claim
|
||||
@@ -155,6 +175,20 @@ spec:
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Set default labels on AWX resource?
|
||||
path: set_self_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
|
||||
- displayName: Additional labels defined on the resource, which should be propagated
|
||||
to child resources
|
||||
path: additional_labels
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
- displayName: Node Selector for backup management pod
|
||||
path: db_management_pod_node_selector
|
||||
x-descriptors:
|
||||
- urn:alm:descriptor:com.tectonic.ui:advanced
|
||||
statusDescriptors:
|
||||
- description: The state of the restore
|
||||
displayName: Restore Status
|
||||
|
||||
10
docs/README.md
Normal file
10
docs/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Building the Ansible AWX Operator Docs
|
||||
|
||||
To build the AWX Operator docs locally:
|
||||
|
||||
1. Clone the AWX operator repository.
|
||||
2. From the root directory:
|
||||
a. pip install --user -r docs/requirements.txt
|
||||
b. mkdocs build
|
||||
|
||||
This will create a new directory called `site/` in the root of your clone containing the index.html and static files. To view the docs in your browser, navigate there in your file explorer and double-click on the `index.html` file. This should open the docs site in your browser.
|
||||
@@ -8,3 +8,18 @@ After the draft release is created, publish it and the [Promote AWX Operator ima
|
||||
|
||||
- Publish image to Quay
|
||||
- Release Helm chart
|
||||
|
||||
After the GHA is complete, the final step is to run the [publish-to-operator-hub.sh](./hack/publish-to-operator-hub.sh) script, which will create a PR in the following repos to add the new awx-operator bundle version to OperatorHub:
|
||||
* https://github.com/k8s-operatorhub/community-operators (community operator index)
|
||||
* https://github.com/redhat-openshift-ecosystem/community-operators-prod (operator index shipped with Openshift)
|
||||
|
||||
The usage is documented in the script itself, but here is an example of how you would use the script to publish the 2.5.3 awx-opeator bundle to OperatorHub.
|
||||
Note that you need to specify the version being released, as well as the previous version. This is because the bundle has a pointer to the previous version that is it being upgrade from. This is used by OLM to create a dependency graph.
|
||||
|
||||
```bash
|
||||
$ VERSION=2.5.3 PREV_VERSION=2.5.2 ./publish-operator.sh
|
||||
```
|
||||
|
||||
> Note: There are some quirks with running this on OS X that still need to be fixed, but the script runs smoothly on linux.
|
||||
|
||||
As soon as CI completes successfully, the PR's will be auto-merged. Please remember to monitor those PR's to make sure that CI passes, sometimes it needs a retry.
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Docs Breakdown for AWX Operator
|
||||
|
||||
## Introduction
|
||||
|
||||
This table below is aimed at breaking down the ReadME documentation for Ansible AWX Operator and structure it in the way it can be moved to the Read The Docs module.
|
||||
|
||||
From the ReadMe file, the documentation can be classified into six distinct segments which are:
|
||||
|
||||
|
||||
- Introduction/Getting Started
|
||||
- Installation
|
||||
- User Guide
|
||||
- Upgrade
|
||||
- Uninstall
|
||||
- Contributors Guide
|
||||
|
||||
Using these listed segments, we can do a proper breakdown of all the topics in the ReadMe and place each one in the segment they fall into. This table is open to any form of refactoring or modifications.
|
||||
|
||||
| Segments | Topics |
|
||||
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Introduction | - [Purpose](https://github.com/ansible/awx-operator#purpose) |
|
||||
| Installation | - [Creating a minikube cluster for testing](https://github.com/ansible/awx-operator#creating-a-minikube-cluster-for-testing)<br>- [Basic Install](https://github.com/ansible/awx-operator#basic-install)<br>- [Helm Install on existing cluster](https://github.com/ansible/awx-operator#helm-install-on-existing-cluster) |
|
||||
| User Guide | - [Admin user account configuration](https://github.com/ansible/awx-operator#admin-user-account-configuration)<br>- [Network and TLS Configuration](https://github.com/ansible/awx-operator#network-and-tls-configuration)<br> * [Service Type](https://github.com/ansible/awx-operator#service-type)<br> * [Ingress Type](https://github.com/ansible/awx-operator#ingress-type)<br>- [Database Configuration](https://github.com/ansible/awx-operator#database-configuration)<br> * [External PostgreSQL Service](https://github.com/ansible/awx-operator#external-postgresql-service)<br> * [Migrating data from an old AWX instance](https://github.com/ansible/awx-operator#migrating-data-from-an-old-awx-instance)<br> * [Managed PostgreSQL Service](https://github.com/ansible/awx-operator#managed-postgresql-service)<br>- [Advanced Configuration](https://github.com/ansible/awx-operator#advanced-configuration)<br> * [Deploying a specific version of AWX](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx)<br> * [Redis container capabilities](https://github.com/ansible/awx-operator#redis-container-capabilities)<br> * [Privileged Tasks](https://github.com/ansible/awx-operator#privileged-tasks)<br> * [Containers Resource Requirements](https://github.com/ansible/awx-operator#containers-resource-requirements)<br> * [Priority Classes](https://github.com/ansible/awx-operator#priority-classes)<br> * [Assigning AWX pods to specific nodes](https://github.com/ansible/awx-operator#assigning-awx-pods-to-specific-nodes)<br> * [Trusting a Custom Certificate Authority](https://github.com/ansible/awx-operator#trusting-a-custom-certificate-authority)<br> * [Enabling LDAP Integration at AWX bootstrap](https://github.com/ansible/awx-operator#enabling-ldap-integration-at-awx-bootstrap)<br> * [Persisting Projects Directory](https://github.com/ansible/awx-operator#persisting-projects-directory)<br> * [Custom Volume and Volume Mount Options](https://github.com/ansible/awx-operator#custom-volume-and-volume-mount-options)<br> * [Default execution environments from private registries](https://github.com/ansible/awx-operator#default-execution-environments-from-private-registries)<br> * * [Control plane ee from private registry](https://github.com/ansible/awx-operator#control-plane-ee-from-private-registry)<br> * [Exporting Environment Variables to Containers](https://github.com/ansible/awx-operator#exporting-environment-variables-to-containers)<br> * [CSRF Cookie Secure Setting](https://github.com/ansible/awx-operator#csrf-cookie-secure-setting)<br> * [Session Cookie Secure Setting](https://github.com/ansible/awx-operator#session-cookie-secure-setting)<br> * [Extra Settings](https://github.com/ansible/awx-operator#extra-settings)<br> * [Configure no_log](https://github.com/ansible/awx-operator#no-log)<br> * [Auto Upgrade](https://github.com/ansible/awx-operator#auto-upgrade)<br> ** [Upgrade of instances without auto upgrade](https://github.com/ansible/awx-operator#upgrade-of-instances-without-auto-upgrade)<br> * [Service Account](https://github.com/ansible/awx-operator#service-account)<br> * [Labeling operator managed objects](https://github.com/ansible/awx-operator#labeling-operator-managed-objects)<br> * [Pods termination grace period](https://github.com/ansible/awx-operator#pods-termination-grace-period)<br> * [Disable IPV6](https://github.com/ansible/awx-operator#disable-ipv6)<br> * [Add Execution Nodes](https://github.com/ansible/awx-operator#adding-execution-nodes)<br> ** [Custom Receptor CA](https://github.com/ansible/awx-operator#custom-receptor-ca)<br> * [Debugging](https://github.com/ansible/awx-operator/blob/devel/docs/debugging.md)<br> * [Migration](https://github.com/ansible/awx-operator/blob/devel/docs/migration.md) |
|
||||
| Upgrade | - [Upgrading](https://github.com/ansible/awx-operator#upgrading)<br> * [Backup](https://github.com/ansible/awx-operator#backup)<br> * [v0.14.0](https://github.com/ansible/awx-operator#v0140)<br> ** [Cluster-scope to Namespace-scope considerations](https://github.com/ansible/awx-operator#cluster-scope-to-namespace-scope-considerations)<br> ** [Project is now based on v1.x of the operator-sdk project](https://github.com/ansible/awx-operator#project-is-now-based-on-v1x-of-the-operator-sdk-project)<br> ** [Steps to upgrade](https://github.com/ansible/awx-operator#steps-to-upgrade) |
|
||||
| Uninstall | - [Uninstall](https://github.com/ansible/awx-operator#uninstall) |
|
||||
| Contributors Guide | - [Contributing](https://github.com/ansible/awx-operator#contributing)<br>- [Release Process](https://github.com/ansible/awx-operator#release-process)<br>- [Author](https://github.com/ansible/awx-operator#author)<br>- [Code of Conduct](https://github.com/ansible/awx-operator#code-of-conduct)<br>- [Get Involved](https://github.com/ansible/awx-operator#get-involved) |
|
||||
|
||||
|
||||
Note: I could not get the multi-level bullet point list to work in the table so I used single asterisk `*` for one level down and double asterisk `**` for two level down.
|
||||
@@ -1 +1,2 @@
|
||||
# Welcome to the documentation of ansible awx-operator
|
||||
|
||||
The AWX operator is meant to provide a more Kubernetes-native installation method for AWX via an AWX Custom Resource Definition (CRD).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
For those that wish to use [Helm](https://helm.sh/) to install the awx-operator to an existing K8s cluster:
|
||||
|
||||
The helm chart is generated from the `helm-chart` Makefile section using the starter files in `.helm/starter`. Consult [the documentation](.helm/starter/README.md) on how to customize the AWX resource with your own values.
|
||||
The helm chart is generated from the `helm-chart` Makefile section using the starter files in `.helm/starter`. Consult [the documentation](https://github.com/ansible/awx-operator/blob/devel/.helm/starter/README.md) on how to customize the AWX resource with your own values.
|
||||
|
||||
```bash
|
||||
$ helm repo add awx-operator https://ansible.github.io/awx-operator/
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
## Usage
|
||||
|
||||
This Kubernetes Operator is meant to be deployed in your Kubernetes cluster(s) and can manage one or more AWX instances in any namespace.
|
||||
@@ -1,3 +0,0 @@
|
||||
## Purpose
|
||||
|
||||
This operator is meant to provide a more Kubernetes-native installation method for AWX via an AWX Custom Resource Definition (CRD).
|
||||
@@ -1,10 +1,10 @@
|
||||
cairosvg==2.7.0
|
||||
markdown-exec>=1.6.0
|
||||
mkdocs-ansible[lock]>=0.1.6
|
||||
mkdocs-ansible>=0.1.6
|
||||
mkdocs-gen-files>=0.4.0
|
||||
mkdocs-material-extensions>=1.1.1
|
||||
mkdocs-material>=9.1.15
|
||||
mkdocs==1.4.3
|
||||
mkdocs-material>=9.1.18
|
||||
mkdocs
|
||||
mkdocstrings-python>=1.1.0
|
||||
mkdocstrings>=0.22.0
|
||||
pillow==9.5.0
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
# Debugging the AWX Operator
|
||||
|
||||
## General Debugging
|
||||
|
||||
When the operator is deploying AWX, it is running the `installer` role inside the operator container. If the AWX CR's status is `Failed`, it is often useful to look at the awx-operator container logs, which shows the output of the installer role. To see these logs, run:
|
||||
|
||||
```
|
||||
kubectl logs deployments/awx-operator-controller-manager -c awx-manager -f
|
||||
```
|
||||
|
||||
### Inspect k8s Resources
|
||||
|
||||
Past that, it is often useful to inspect various resources the AWX Operator manages like:
|
||||
* awx
|
||||
* awxbackup
|
||||
* awxrestore
|
||||
* pod
|
||||
* deployment
|
||||
* pvc
|
||||
* service
|
||||
* ingress
|
||||
* route
|
||||
* secrets
|
||||
* serviceaccount
|
||||
|
||||
And if installing via OperatorHub and OLM:
|
||||
* subscription
|
||||
* csv
|
||||
* installPlan
|
||||
* catalogSource
|
||||
|
||||
To inspect these resources you can use these commands
|
||||
|
||||
```
|
||||
# Inspecting k8s resources
|
||||
kubectl describe -n <namespace> <resource> <resource-name>
|
||||
kubectl get -n <namespace> <resource> <resource-name> -o yaml
|
||||
kubectl logs -n <namespace> <resource> <resource-name>
|
||||
|
||||
# Inspecting Pods
|
||||
kubectl exec -it -n <namespace> <pod> <pod-name>
|
||||
```
|
||||
|
||||
|
||||
### Configure No Log
|
||||
|
||||
It is possible to show task output for debugging by setting no_log to false on the AWX CR spec.
|
||||
This will show output in the awx-operator logs for any failed tasks where no_log was set to true.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
---
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx-demo
|
||||
spec:
|
||||
service_type: nodeport
|
||||
no_log: false # <------------
|
||||
|
||||
```
|
||||
|
||||
## Iterating on the installer without deploying the operator
|
||||
|
||||
Go through the [normal basic install](https://github.com/ansible/awx-operator/blob/devel/README.md#basic-install) steps.
|
||||
|
||||
Install some dependencies:
|
||||
|
||||
```
|
||||
$ ansible-galaxy collection install -r molecule/requirements.yml
|
||||
$ pip install -r molecule/requirements.txt
|
||||
```
|
||||
|
||||
To prevent the changes we're about to make from being overwritten, scale down any running instance of the operator:
|
||||
|
||||
```
|
||||
$ kubectl scale deployment awx-operator-controller-manager --replicas=0
|
||||
```
|
||||
|
||||
Create a playbook that invokes the installer role (the operator uses ansible-runner's role execution feature):
|
||||
|
||||
```yaml
|
||||
# run.yml
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- installer
|
||||
```
|
||||
|
||||
Create a vars file:
|
||||
|
||||
```yaml
|
||||
# vars.yml
|
||||
---
|
||||
ansible_operator_meta:
|
||||
name: awx
|
||||
namespace: awx
|
||||
service_type: nodeport
|
||||
```
|
||||
The vars file will replace the awx resource so any value that you wish to over ride using the awx resource, put in the vars file. For example, if you wish to use your own image, version and pull policy, you can specify it like below:
|
||||
|
||||
```yaml
|
||||
# vars.yml
|
||||
---
|
||||
ansible_operator_meta:
|
||||
name: awx
|
||||
namespace: awx
|
||||
service_type: nodeport
|
||||
image: $DEV_DOCKER_TAG_BASE/awx_kube_devel
|
||||
image_pull_policy: Always
|
||||
image_version: $COMPOSE_TAG
|
||||
```
|
||||
|
||||
Run the installer:
|
||||
|
||||
```
|
||||
$ ansible-playbook run.yml -e @vars.yml -v
|
||||
```
|
||||
|
||||
Grab the URL and admin password:
|
||||
|
||||
```
|
||||
$ minikube service awx-service --url -n awx
|
||||
$ minikube kubectl get secret awx-admin-password -- -o jsonpath="{.data.password}" | base64 --decode
|
||||
LU6lTfvnkjUvDwL240kXKy1sNhjakZmT
|
||||
```
|
||||
@@ -1,29 +0,0 @@
|
||||
# Docs Breakdown for AWX Operator
|
||||
|
||||
## Introduction
|
||||
|
||||
This table below is aimed at breaking down the ReadME documentation for Ansible AWX Operator and structure it in the way it can be moved to the Read The Docs module.
|
||||
|
||||
From the ReadMe file, the documentation can be classified into six distinct segments which are:
|
||||
|
||||
|
||||
- Introduction/Getting Started
|
||||
- Installation
|
||||
- User Guide
|
||||
- Upgrade
|
||||
- Uninstall
|
||||
- Contributors Guide
|
||||
|
||||
Using these listed segments, we can do a proper breakdown of all the topics in the ReadMe and place each one in the segment they fall into. This table is open to any form of refactoring or modifications.
|
||||
|
||||
| Segments | Topics |
|
||||
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Introduction | - [Purpose](https://github.com/ansible/awx-operator#purpose) |
|
||||
| Installation | - [Creating a minikube cluster for testing](https://github.com/ansible/awx-operator#creating-a-minikube-cluster-for-testing)<br>- [Basic Install](https://github.com/ansible/awx-operator#basic-install)<br>- [Helm Install on existing cluster](https://github.com/ansible/awx-operator#helm-install-on-existing-cluster) |
|
||||
| User Guide | - [Admin user account configuration](https://github.com/ansible/awx-operator#admin-user-account-configuration)<br>- [Network and TLS Configuration](https://github.com/ansible/awx-operator#network-and-tls-configuration)<br> * [Service Type](https://github.com/ansible/awx-operator#service-type)<br> * [Ingress Type](https://github.com/ansible/awx-operator#ingress-type)<br>- [Database Configuration](https://github.com/ansible/awx-operator#database-configuration)<br> * [External PostgreSQL Service](https://github.com/ansible/awx-operator#external-postgresql-service)<br> * [Migrating data from an old AWX instance](https://github.com/ansible/awx-operator#migrating-data-from-an-old-awx-instance)<br> * [Managed PostgreSQL Service](https://github.com/ansible/awx-operator#managed-postgresql-service)<br>- [Advanced Configuration](https://github.com/ansible/awx-operator#advanced-configuration)<br> * [Deploying a specific version of AWX](https://github.com/ansible/awx-operator#deploying-a-specific-version-of-awx)<br> * [Redis container capabilities](https://github.com/ansible/awx-operator#redis-container-capabilities)<br> * [Privileged Tasks](https://github.com/ansible/awx-operator#privileged-tasks)<br> * [Containers Resource Requirements](https://github.com/ansible/awx-operator#containers-resource-requirements)<br> * [Priority Classes](https://github.com/ansible/awx-operator#priority-classes)<br> * [Assigning AWX pods to specific nodes](https://github.com/ansible/awx-operator#assigning-awx-pods-to-specific-nodes)<br> * [Trusting a Custom Certificate Authority](https://github.com/ansible/awx-operator#trusting-a-custom-certificate-authority)<br> * [Enabling LDAP Integration at AWX bootstrap](https://github.com/ansible/awx-operator#enabling-ldap-integration-at-awx-bootstrap)<br> * [Persisting Projects Directory](https://github.com/ansible/awx-operator#persisting-projects-directory)<br> * [Custom Volume and Volume Mount Options](https://github.com/ansible/awx-operator#custom-volume-and-volume-mount-options)<br> * [Default execution environments from private registries](https://github.com/ansible/awx-operator#default-execution-environments-from-private-registries)<br> * * [Control plane ee from private registry](https://github.com/ansible/awx-operator#control-plane-ee-from-private-registry)<br> * [Exporting Environment Variables to Containers](https://github.com/ansible/awx-operator#exporting-environment-variables-to-containers)<br> * [CSRF Cookie Secure Setting](https://github.com/ansible/awx-operator#csrf-cookie-secure-setting)<br> * [Session Cookie Secure Setting](https://github.com/ansible/awx-operator#session-cookie-secure-setting)<br> * [Extra Settings](https://github.com/ansible/awx-operator#extra-settings)<br> * [Configure no_log](https://github.com/ansible/awx-operator#no-log)<br> * [Auto Upgrade](https://github.com/ansible/awx-operator#auto-upgrade)<br> ** [Upgrade of instances without auto upgrade](https://github.com/ansible/awx-operator#upgrade-of-instances-without-auto-upgrade)<br> * [Service Account](https://github.com/ansible/awx-operator#service-account)<br> * [Labeling operator managed objects](https://github.com/ansible/awx-operator#labeling-operator-managed-objects)<br> * [Pods termination grace period](https://github.com/ansible/awx-operator#pods-termination-grace-period)<br> * [Disable IPV6](https://github.com/ansible/awx-operator#disable-ipv6)<br> * [Add Execution Nodes](https://github.com/ansible/awx-operator#adding-execution-nodes)<br> ** [Custom Receptor CA](https://github.com/ansible/awx-operator#custom-receptor-ca)<br> * [Debugging](https://github.com/ansible/awx-operator/blob/devel/docs/debugging.md)<br> * [Migration](https://github.com/ansible/awx-operator/blob/devel/docs/migration.md) |
|
||||
| Upgrade | - [Upgrading](https://github.com/ansible/awx-operator#upgrading)<br> * [Backup](https://github.com/ansible/awx-operator#backup)<br> * [v0.14.0](https://github.com/ansible/awx-operator#v0140)<br> ** [Cluster-scope to Namespace-scope considerations](https://github.com/ansible/awx-operator#cluster-scope-to-namespace-scope-considerations)<br> ** [Project is now based on v1.x of the operator-sdk project](https://github.com/ansible/awx-operator#project-is-now-based-on-v1x-of-the-operator-sdk-project)<br> ** [Steps to upgrade](https://github.com/ansible/awx-operator#steps-to-upgrade) |
|
||||
| Uninstall | - [Uninstall](https://github.com/ansible/awx-operator#uninstall) |
|
||||
| Contributors Guide | - [Contributing](https://github.com/ansible/awx-operator#contributing)<br>- [Release Process](https://github.com/ansible/awx-operator#release-process)<br>- [Author](https://github.com/ansible/awx-operator#author)<br>- [Code of Conduct](https://github.com/ansible/awx-operator#code-of-conduct)<br>- [Get Involved](https://github.com/ansible/awx-operator#get-involved) |
|
||||
|
||||
|
||||
Note: I could not get the multi-level bullet point list to work in the table so I used single asterisk `*` for one level down and double asterisk `**` for two level down.
|
||||
@@ -1,82 +0,0 @@
|
||||
# Migrating data from an old AWX instance
|
||||
|
||||
To migrate data from an older AWX installation, you must provide some information via Secrets.
|
||||
|
||||
## Creating Secrets for Migration
|
||||
|
||||
### Secret Key
|
||||
|
||||
You can find your old secret key in the inventory file you used to deploy AWX in releases prior to version 18.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resourcename>-secret-key
|
||||
namespace: <target-namespace>
|
||||
stringData:
|
||||
secret_key: <old-secret-key>
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
**Note**: `<resourcename>` must match the `name` of the AWX object you are creating. In our example below, it is `awx`.
|
||||
|
||||
### Old Database Credentials
|
||||
|
||||
The secret should be formatted as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: <resourcename>-old-postgres-configuration
|
||||
namespace: <target namespace>
|
||||
stringData:
|
||||
host: <external ip or url resolvable by the cluster>
|
||||
port: "<external port, this usually defaults to 5432>" # quotes are required
|
||||
database: <desired database name>
|
||||
username: <username to connect as>
|
||||
password: <password to connect with>
|
||||
type: Opaque
|
||||
```
|
||||
|
||||
> For `host`, a URL resolvable by the cluster could look something like `postgresql.<namespace>.svc.cluster.local`, where `<namespace>` is filled in with the namespace of the AWX deployment you are migrating data from.
|
||||
|
||||
If your AWX deployment is already using an external database server or its database is otherwise not managed
|
||||
by the AWX deployment, you can instead create the same secret as above but omit the `-old-` from the `name`.
|
||||
In the next section pass it in through `postgres_configuration_secret` instead, omitting the `_old_`
|
||||
from the key and ensuring the value matches the name of the secret. This will make AWX pick up on the existing
|
||||
database and apply any pending migrations. It is strongly recommended to backup your database beforehand.
|
||||
|
||||
The postgresql pod for the old deployment is used when streaming data to the new postgresql pod. If your postgresql pod has a custom label,
|
||||
you can pass that via the `postgres_label_selector` variable to make sure the postgresql pod can be found.
|
||||
|
||||
## Deploy AWX
|
||||
|
||||
When you apply your AWX object, you must specify the name to the database secret you created above:
|
||||
|
||||
```yaml
|
||||
apiVersion: awx.ansible.com/v1beta1
|
||||
kind: AWX
|
||||
metadata:
|
||||
name: awx
|
||||
spec:
|
||||
old_postgres_configuration_secret: <resourcename>-old-postgres-configuration
|
||||
secret_key_secret: <resourcename>-secret-key
|
||||
...
|
||||
```
|
||||
## Important Note
|
||||
If you intend to put all the above in one file, make sure to separate each block with three dashes like so:
|
||||
|
||||
```yaml
|
||||
---
|
||||
# Secret key
|
||||
|
||||
---
|
||||
# Database creds
|
||||
|
||||
---
|
||||
# AWX Config
|
||||
```
|
||||
Failing to do so will lead to an inoperable setup.
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#### Postgres Version
|
||||
|
||||
The default Postgres version for the version of AWX bundled with the latest version of the awx-operator is Postgres 13. You can find this default for a given version by at the default value for [_postgres_image_version](./roles/installer/defaults/main.yml#L138).
|
||||
The default Postgres version for the version of AWX bundled with the latest version of the awx-operator is Postgres 13. You can find this default for a given version by at the default value for [_postgres_image_version](https://github.com/ansible/awx-operator/blob/devel/roles/installer/defaults/main.yml#L243).
|
||||
|
||||
We only have coverage for the default version of Postgres. Newer versions of Postgres (14+) will likely work, but should only be configured as an external database. If your database is managed by the awx-operator (default if you don't specify a `postgres_configuration_secret`), then you should not override the default version as this may cause issues when awx-operator tries to upgrade your postgresql pod.
|
||||
|
||||
@@ -48,7 +48,7 @@ spec:
|
||||
|
||||
#### Migrating data from an old AWX instance
|
||||
|
||||
For instructions on how to migrate from an older version of AWX, see [migration.md](/docs/user-guide/advanced-configuration/migration.md).
|
||||
For instructions on how to migrate from an older version of AWX, see [migration.md](../migration/migration.md).
|
||||
|
||||
#### Managed PostgreSQL Service
|
||||
|
||||
|
||||
125
hack/publish-to-operator-hub.sh
Normal file
125
hack/publish-to-operator-hub.sh
Normal file
@@ -0,0 +1,125 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Create PR to Publish to community-operators and community-operators-prod
|
||||
#
|
||||
# * Create upstream awx-operator release
|
||||
# * Check out tag (1.1.2).
|
||||
# * Run VERSION=1.1.2 make bundle
|
||||
# * Clone https://github.com/k8s-operatorhub/community-operators --branch main
|
||||
# * mkdir -p operators/awx-operator/0.31.0/
|
||||
# * Copy in manifests/ metadata/ and tests/ directories into operators/awx-operator/1.1.2/
|
||||
# * Use sed to add in a replaces or skip entry. replace by default.
|
||||
# * No need to update config.yaml
|
||||
# * Build and Push operator and bundle images
|
||||
# * Open PR or at least push to a branch so that a PR can be manually opened from it.
|
||||
#
|
||||
# Usage:
|
||||
# First, check out awx-operator tag you intend to release, in this case, 1.0.0
|
||||
# $ VERSION=1.1.2 PREV_VERSION=1.1.1 FORK=<your-fork> ./publish-operator.sh
|
||||
#
|
||||
# Remember to change update the VERSION and PREV_VERSION before running!!!
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
VERSION=${VERSION:-blah2}
|
||||
PREV_VERSION=${PREV_VERSION:-blah1}
|
||||
BRANCH=publish-awx-operator-$VERSION
|
||||
FORK=${FORK:-fork}
|
||||
|
||||
IMG=quay.io/ansible/awx-operator:$VERSION
|
||||
CATALOG_IMG=quay.io/ansible/awx-operator-catalog:$VERSION
|
||||
BUNDLE_IMG=quay.io/ansible/awx-operator-bundle:$VERSION
|
||||
|
||||
# Set path variables
|
||||
OPERATOR_PATH=${OPERATOR_PATH:-~/awx-operator}
|
||||
|
||||
# Build & Push Operator Image # Not needed because it is done as part of the GHA release automation
|
||||
# make docker-build docker-push IMG=$IMG
|
||||
|
||||
# Build bundle directory
|
||||
rm -rf bundle/
|
||||
make bundle IMG=$IMG
|
||||
|
||||
# Build bundle and catalog images
|
||||
make bundle-build bundle-push BUNDLE_IMG=$BUNDLE_IMG IMG=$IMG
|
||||
make catalog-build catalog-push CATALOG_IMG=$CATALOG_IMG BUNDLE_IMGS=$BUNDLE_IMG BUNDLE_IMG=$BUNDLE_IMG IMG=$IMG
|
||||
|
||||
# Set containerImage & namespace variables in CSV
|
||||
sed -i -e "s|containerImage: quay.io/ansible/awx-operator:devel|containerImage: quay.io/ansible/awx-operator:${VERSION}|g" bundle/manifests/awx-operator.clusterserviceversion.yaml
|
||||
sed -i -e "s|namespace: placeholder|namespace: awx|g" bundle/manifests/awx-operator.clusterserviceversion.yaml
|
||||
|
||||
# Add replaces to dependency graph for upgrade path
|
||||
if ! grep -qF 'replaces: awx-operator.v${PREV_VERSION}' bundle/manifests/awx-operator.clusterserviceversion.yaml; then
|
||||
sed -i -e "/version: ${VERSION}/a \\
|
||||
replaces: awx-operator.v$PREV_VERSION" bundle/manifests/awx-operator.clusterserviceversion.yaml
|
||||
fi
|
||||
|
||||
# Rename CSV to contain version in name
|
||||
mv bundle/manifests/awx-operator.clusterserviceversion.yaml bundle/manifests/awx-operator.v${VERSION}.clusterserviceversion.yaml
|
||||
|
||||
# Set Openshift Support Range (bump minKubeVersion in CSV when changing)
|
||||
if ! grep -qF 'openshift.versions' bundle/metadata/annotations.yaml; then
|
||||
sed -i -e "/annotations:/a \\
|
||||
com.redhat.openshift.versions: v4.10-v4.13\n" bundle/metadata/annotations.yaml
|
||||
fi
|
||||
|
||||
# -- Put up community-operators PR
|
||||
cd $OPERATOR_PATH
|
||||
git clone git@github.com:k8s-operatorhub/community-operators.git
|
||||
|
||||
mkdir -p community-operators/operators/awx-operator/$VERSION/
|
||||
cp -r bundle/* community-operators/operators/awx-operator/$VERSION/
|
||||
cd community-operators/operators/awx-operator/$VERSION/
|
||||
pwd
|
||||
ls -la
|
||||
|
||||
# Commit and push PR
|
||||
git checkout -b $BRANCH
|
||||
git add ./
|
||||
git status
|
||||
|
||||
message='operator [N] [CI] awx-operator'
|
||||
commitMessage="${message} ${VERSION}"
|
||||
git commit -m "$commitMessage" -s
|
||||
|
||||
git remote add upstream git@github.com:$FORK/community-operators.git
|
||||
git push upstream $BRANCH
|
||||
|
||||
|
||||
# -- Put up community-operators-prod PR
|
||||
# Reset directory
|
||||
cd $OPERATOR_PATH
|
||||
|
||||
pwd
|
||||
|
||||
git clone git@github.com:redhat-openshift-ecosystem/community-operators-prod.git
|
||||
|
||||
mkdir -p community-operators-prod/operators/awx-operator/$VERSION/
|
||||
cp -r bundle/* community-operators-prod/operators/awx-operator/$VERSION/
|
||||
cd community-operators-prod/operators/awx-operator/$VERSION/
|
||||
|
||||
pwd
|
||||
ls -la
|
||||
|
||||
# Commit and push PR
|
||||
git checkout -b $BRANCH
|
||||
git add ./
|
||||
git status
|
||||
|
||||
message='operator [N] [CI] awx-operator'
|
||||
commitMessage="${message} ${VERSION}"
|
||||
git commit -m "$commitMessage" -s
|
||||
|
||||
git remote add upstream git@github.com:$FORK/community-operators-prod.git
|
||||
git push upstream $BRANCH
|
||||
|
||||
|
||||
# -- Print Links to Branches
|
||||
echo "Commnity Operators: https://github.com/$FORK/community-operators/pull/new/$BRANCH"
|
||||
echo "Commnity Operators Prod: https://github.com/$FORK/community-operators-prod/pull/new/$BRANCH"
|
||||
|
||||
# -- Cleanup
|
||||
|
||||
rm -rf $OPERATOR_PATH/community-operators
|
||||
rm -rf $OPERATOR_PATH/community-operators-prod
|
||||
57
mkdocs.yml
57
mkdocs.yml
@@ -1,5 +1,5 @@
|
||||
---
|
||||
site_name: awx-operator
|
||||
site_name: Ansible AWX Operator Documentation
|
||||
site_url: https://awx-operator.readthedocs.io/
|
||||
repo_url: https://github.com/ansible/awx-operator
|
||||
edit_uri: blob/devel/docs/
|
||||
@@ -8,7 +8,7 @@ strict: true
|
||||
use_directory_urls: false
|
||||
|
||||
theme:
|
||||
name: "material"
|
||||
name: "ansible"
|
||||
features:
|
||||
- content.code.copy
|
||||
- content.action.edit
|
||||
@@ -35,9 +35,56 @@ theme:
|
||||
name: Switch to light mode
|
||||
|
||||
nav:
|
||||
- home: index.md
|
||||
- debugging.md
|
||||
- migration.md
|
||||
- index.md
|
||||
- Contributors Guide:
|
||||
- contributors-guide/contributing.md
|
||||
- contributors-guide/release-process.md
|
||||
- contributors-guide/author.md
|
||||
- contributors-guide/code-of-conduct.md
|
||||
- contributors-guide/get-involved.md
|
||||
- Installation:
|
||||
- Installation: installation/index.md
|
||||
- installation/basic-install.md
|
||||
- installation/creating-a-minikube-cluster-for-testing.md
|
||||
- installation/helm-install-on-existing-cluster.md
|
||||
- Migrate:
|
||||
- migration/migration.md
|
||||
- Uninstall:
|
||||
- uninstall/uninstall.md
|
||||
- User Guide:
|
||||
- user-guide/admin-user-account-configuration.md
|
||||
- user-guide/network-and-tls-configuration.md
|
||||
- user-guide/database-configuration.md
|
||||
- Upgrade:
|
||||
- upgrade/upgrading.md
|
||||
- Advanced Configuration:
|
||||
- user-guide/advanced-configuration/deploying-a-specific-version-of-awx.md
|
||||
- user-guide/advanced-configuration/redis-container-capabilities.md
|
||||
- user-guide/advanced-configuration/privileged-tasks.md
|
||||
- user-guide/advanced-configuration/containers-resource-requirements.md
|
||||
- user-guide/advanced-configuration/priority-classes.md
|
||||
- user-guide/advanced-configuration/scaling-the-web-and-task-pods-independently.md
|
||||
- user-guide/advanced-configuration/assigning-awx-pods-to-specific-nodes.md
|
||||
- user-guide/advanced-configuration/trusting-a-custom-certificate-authority.md
|
||||
- user-guide/advanced-configuration/enabling-ldap-integration-at-awx-bootstrap.md
|
||||
- user-guide/advanced-configuration/persisting-projects-directory.md
|
||||
- user-guide/advanced-configuration/custom-volume-and-volume-mount-options.md
|
||||
- user-guide/advanced-configuration/default-execution-environments-from-private-registries.md
|
||||
- user-guide/advanced-configuration/exporting-environment-variables-to-containers.md
|
||||
- user-guide/advanced-configuration/csrf-cookie-secure-setting.md
|
||||
- user-guide/advanced-configuration/session-cookie-secure-setting.md
|
||||
- user-guide/advanced-configuration/extra-settings.md
|
||||
- user-guide/advanced-configuration/no-log.md
|
||||
- user-guide/advanced-configuration/auto-upgrade.md
|
||||
- user-guide/advanced-configuration/service-account.md
|
||||
- user-guide/advanced-configuration/labeling-operator-managed-objects.md
|
||||
- user-guide/advanced-configuration/pods-termination-grace-period.md
|
||||
- user-guide/advanced-configuration/disable-ipv6.md
|
||||
- Troubleshooting:
|
||||
- troubleshooting/debugging.md
|
||||
|
||||
exclude_docs:
|
||||
README.md
|
||||
|
||||
plugins:
|
||||
- autorefs
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
---
|
||||
- block:
|
||||
- debug:
|
||||
msg: test - web_replicas and task_replicas should override replicas
|
||||
- debug:
|
||||
msg: test - web_replicas and task_replicas should override replicas
|
||||
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 2
|
||||
web_replicas: 0
|
||||
task_replicas: 0
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 2
|
||||
web_replicas: 0
|
||||
task_replicas: 0
|
||||
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 0
|
||||
expected_task_replicas: 0
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 0
|
||||
expected_task_replicas: 0
|
||||
|
||||
####
|
||||
|
||||
- debug:
|
||||
msg: test - replicas should act as a default
|
||||
- debug:
|
||||
msg: test - replicas should act as a default
|
||||
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 2
|
||||
web_replicas: 1
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 2
|
||||
web_replicas: 1
|
||||
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 1
|
||||
expected_task_replicas: 2
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 1
|
||||
expected_task_replicas: 2
|
||||
|
||||
####
|
||||
|
||||
- debug:
|
||||
msg: test - replicas=0 should kill all pods
|
||||
- debug:
|
||||
msg: test - replicas=0 should kill all pods
|
||||
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 0
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 0
|
||||
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 0
|
||||
expected_task_replicas: 0
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 0
|
||||
expected_task_replicas: 0
|
||||
|
||||
####
|
||||
|
||||
- debug:
|
||||
msg: test - replicas=3 should give 3 of each
|
||||
- debug:
|
||||
msg: test - replicas=3 should give 3 of each
|
||||
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 3
|
||||
- include_tasks: apply_awx_spec.yml
|
||||
vars:
|
||||
additional_fields:
|
||||
replicas: 3
|
||||
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 3
|
||||
expected_task_replicas: 3
|
||||
- include_tasks: _test_case_replicas.yml
|
||||
vars:
|
||||
expected_web_replicas: 3
|
||||
expected_task_replicas: 3
|
||||
tags:
|
||||
- replicas
|
||||
|
||||
@@ -44,4 +44,7 @@ additional_labels: []
|
||||
|
||||
# Maintain some of the recommended `app.kubernetes.io/*` labels on the resource (self)
|
||||
set_self_labels: true
|
||||
|
||||
# Number of whole hours worth of events table partitions to precreate before starting backup to avoid pg_dump locks.
|
||||
precreate_partition_hours: 3
|
||||
...
|
||||
|
||||
@@ -82,6 +82,41 @@
|
||||
resolvable_db_host: '{{ (awx_postgres_type == "managed") | ternary(awx_postgres_host + "." + ansible_operator_meta.namespace + ".svc.cluster.local", awx_postgres_host) }}' # yamllint disable-line rule:line-length
|
||||
no_log: "{{ no_log }}"
|
||||
|
||||
- name: Get the current resource task pod information.
|
||||
k8s_info:
|
||||
api_version: v1
|
||||
kind: Pod
|
||||
namespace: '{{ ansible_operator_meta.namespace }}'
|
||||
label_selectors:
|
||||
- "app.kubernetes.io/name={{ ansible_operator_meta.name }}-task"
|
||||
- "app.kubernetes.io/managed-by={{ deployment_type }}-operator"
|
||||
- "app.kubernetes.io/component={{ deployment_type }}"
|
||||
field_selectors:
|
||||
- status.phase=Running
|
||||
register: awx_task_pod
|
||||
|
||||
- name: Set the resource pod as a variable.
|
||||
set_fact:
|
||||
awx_task_pod: >-
|
||||
{{ awx_task_pod['resources']
|
||||
| rejectattr('metadata.deletionTimestamp', 'defined')
|
||||
| sort(attribute='metadata.creationTimestamp')
|
||||
| first | default({}) }}
|
||||
|
||||
- name: Set the resource pod name as a variable.
|
||||
set_fact:
|
||||
awx_task_pod_name: "{{ awx_task_pod['metadata']['name'] | default('') }}"
|
||||
|
||||
- name: Precreate database partitions
|
||||
k8s_exec:
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
pod: "{{ awx_task_pod_name }}"
|
||||
container: "{{ deployment_name }}-task"
|
||||
command: awx-manage precreate_partitions --count='{{ precreate_partition_hours }}'
|
||||
when: precreate_partition_hours > 0
|
||||
register: result
|
||||
changed_when: "'Created partitions for' in result.stdout"
|
||||
|
||||
- name: Set pg_dump command
|
||||
set_fact:
|
||||
pgdump: >-
|
||||
|
||||
@@ -273,7 +273,7 @@ _init_projects_container_image: quay.io/centos/centos:stream9
|
||||
|
||||
create_preload_data: true
|
||||
|
||||
replicas: "1"
|
||||
replicas: 1
|
||||
web_replicas: ''
|
||||
task_replicas: ''
|
||||
|
||||
|
||||
@@ -59,14 +59,29 @@
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
pod: "{{ postgres_pod_name }}"
|
||||
command: |
|
||||
bash -c """
|
||||
bash -c "
|
||||
function end_keepalive {
|
||||
rc=$?
|
||||
rm -f \"$1\"
|
||||
kill $(cat /proc/$2/task/$2/children 2>/dev/null) 2>/dev/null || true
|
||||
wait $2 || true
|
||||
exit $rc
|
||||
}
|
||||
keepalive_file=\"$(mktemp)\"
|
||||
while [[ -f \"$keepalive_file\" ]]; do
|
||||
echo 'Migrating data from old database...'
|
||||
sleep 60
|
||||
done &
|
||||
keepalive_pid=$!
|
||||
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
|
||||
echo keepalive_pid: $keepalive_pid
|
||||
set -e -o pipefail
|
||||
PGPASSWORD='{{ awx_old_postgres_pass }}' {{ pgdump }} | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
||||
PGPASSWORD=\"$PGPASSWORD_OLD\" {{ pgdump }} | PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pg_restore }}
|
||||
set +e +o pipefail
|
||||
echo 'Successful'
|
||||
"""
|
||||
"
|
||||
no_log: "{{ no_log }}"
|
||||
register: data_migration
|
||||
failed_when: "'Successful' not in data_migration.stdout"
|
||||
|
||||
- name: Set flag signifying that this instance has been migrated
|
||||
set_fact:
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
---
|
||||
|
||||
- name: Check for presence of Deployment
|
||||
k8s_info:
|
||||
api_version: apps/v1
|
||||
kind: Deployment
|
||||
name: "{{ ansible_operator_meta.name }}"
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
register: this_deployment
|
||||
label_selectors:
|
||||
- 'app.kubernetes.io/part-of={{ ansible_operator_meta.name }}'
|
||||
- 'app.kubernetes.io/managed-by={{ deployment_type }}-operator'
|
||||
- 'app.kubernetes.io/component={{ deployment_type }}'
|
||||
register: _deployments
|
||||
|
||||
- name: Scale down Deployment for migration
|
||||
kubernetes.core.k8s_scale:
|
||||
@@ -16,7 +18,5 @@
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
replicas: 0
|
||||
wait: yes
|
||||
loop:
|
||||
- "{{ ansible_operator_meta.name }}-task"
|
||||
- "{{ ansible_operator_meta.name }}-web"
|
||||
when: this_deployment['resources'] | length
|
||||
loop: "{{ _deployments.resources | map(attribute='metadata.name') | list }}"
|
||||
when: _deployments.resources | length
|
||||
|
||||
@@ -91,11 +91,27 @@
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
pod: "{{ postgres_pod_name }}"
|
||||
command: |
|
||||
bash -c """
|
||||
bash -c "
|
||||
function end_keepalive {
|
||||
rc=$?
|
||||
rm -f \"$1\"
|
||||
kill $(cat /proc/$2/task/$2/children 2>/dev/null) 2>/dev/null || true
|
||||
wait $2 || true
|
||||
exit $rc
|
||||
}
|
||||
keepalive_file=\"$(mktemp)\"
|
||||
while [[ -f \"$keepalive_file\" ]]; do
|
||||
echo 'Migrating data to new PostgreSQL {{ supported_postgres_version }} Database...'
|
||||
sleep 60
|
||||
done &
|
||||
keepalive_pid=$!
|
||||
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
|
||||
echo keepalive_pid: $keepalive_pid
|
||||
set -e -o pipefail
|
||||
PGPASSWORD='{{ awx_postgres_pass }}' {{ pgdump }} | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
||||
PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pgdump }} | PGPASSWORD=\"$POSTGRES_PASSWORD\" {{ pg_restore }}
|
||||
set +e +o pipefail
|
||||
echo 'Successful'
|
||||
"""
|
||||
"
|
||||
no_log: "{{ no_log }}"
|
||||
register: data_migration
|
||||
failed_when: "'Successful' not in data_migration.stdout"
|
||||
|
||||
@@ -94,6 +94,13 @@ spec:
|
||||
value: '{{ postgres_initdb_args }}'
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: '{{ postgres_host_auth_method }}'
|
||||
{% if 'resources' in old_pg_config and old_pg_config['resources'] and 'password' in old_pg_config['resources'][0]['data'] %}
|
||||
- name: PGPASSWORD_OLD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: '{{ old_pg_config['resources'][0]['metadata']['name'] }}'
|
||||
key: password
|
||||
{% endif %}
|
||||
ports:
|
||||
- containerPort: {{ awx_postgres_port | default('5432')}}
|
||||
name: postgres-{{ supported_pg_version }}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
k8s_info:
|
||||
api_version: apps/v1
|
||||
kind: Deployment
|
||||
name: "{{ ansible_operator_meta.namespace }}-task"
|
||||
name: "{{ deployment_name }}-task"
|
||||
namespace: "{{ ansible_operator_meta.namespace }}"
|
||||
register: this_deployment
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
replicas: 0
|
||||
wait: yes
|
||||
loop:
|
||||
- "{{ ansible_operator_meta.name }}-task"
|
||||
- "{{ ansible_operator_meta.name }}-web"
|
||||
- "{{ deployment_name }}-task"
|
||||
- "{{ deployment_name }}-web"
|
||||
when: this_deployment['resources'] | length
|
||||
|
||||
- name: Set full resolvable host name for postgres pod
|
||||
@@ -87,11 +87,27 @@
|
||||
namespace: "{{ backup_pvc_namespace }}"
|
||||
pod: "{{ ansible_operator_meta.name }}-db-management"
|
||||
command: |
|
||||
bash -c """
|
||||
bash -c "
|
||||
function end_keepalive {
|
||||
rc=$?
|
||||
rm -f \"$1\"
|
||||
kill $(cat /proc/$2/task/$2/children 2>/dev/null) 2>/dev/null || true
|
||||
wait $2 || true
|
||||
exit $rc
|
||||
}
|
||||
keepalive_file=\"$(mktemp)\"
|
||||
while [[ -f \"$keepalive_file\" ]]; do
|
||||
echo 'Migrating data from old database...'
|
||||
sleep 60
|
||||
done &
|
||||
keepalive_pid=$!
|
||||
trap 'end_keepalive \"$keepalive_file\" \"$keepalive_pid\"' EXIT SIGINT SIGTERM
|
||||
echo keepalive_pid: $keepalive_pid
|
||||
set -e -o pipefail
|
||||
cat {{ backup_dir }}/tower.db | PGPASSWORD='{{ awx_postgres_pass }}' {{ pg_restore }}
|
||||
set +e +o pipefail
|
||||
echo 'Successful'
|
||||
"""
|
||||
"
|
||||
register: data_migration
|
||||
no_log: "{{ no_log }}"
|
||||
failed_when: "'Successful' not in data_migration.stdout"
|
||||
|
||||
Reference in New Issue
Block a user