Skip to content

Commit

Permalink
Remove more docker-community references
Browse files Browse the repository at this point in the history
  • Loading branch information
rooftopcellist committed Feb 17, 2021
1 parent 9fd042b commit f9271b1
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 44 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
awx/ui/node_modules
tools/docker-community/_pgdocker
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ tools/prometheus/data
tools/ansible/awx_dump.sql
tools/docker-compose/Dockerfile
tools/docker-compose/_build
tools/docker-community/docker-compose-community.yml
tools/docker-community/Dockerfile
tools/docker-community/files/*
tools/docker-community/_pgdocker
tools/docker-community/_build
tools/docker-compose/_sources
tools/docker-compose/overrides/

# Tower setup playbook testing
setup/test/roles/postgresql
Expand Down Expand Up @@ -153,12 +150,10 @@ use_dev_supervisor.txt
.idea/*
*.unison.tmp
*.#
/tools/docker-compose/overrides/
/awx/ui_next/.ui-built
/Dockerfile
/_build/
/_build_kube_dev/
/Dockerfile.kube-dev
/_build_community/
/Dockerfile.community
/tools/docker-compose/_sources/
33 changes: 13 additions & 20 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ If your provider is able to allocate an IP Address from the Ingress controller t
Unlike Openshift's `Route` the Kubernetes `Ingress` doesn't yet handle SSL termination. As such the default configuration will only expose AWX through HTTP on port 80. You are responsible for configuring SSL support until support is added (either to Kubernetes or AWX itself).


## Community Docker Compose
## Docker Compose

### Prerequisites

Expand All @@ -435,9 +435,9 @@ Unlike Openshift's `Route` the Kubernetes `Ingress` doesn't yet handle SSL termi

### Pre-install steps

#### Migrating data from Local Docker to Community Docker Compose
#### Migrating data from Local Docker to the Development Environment

When Local Docker playbook was removed (`installer/install.yml`) and replaced with the Community Docker Compose, we also moved from using bind-mounts, to volumes. As a result, when upgrading from AWX <17.0.1, an extra migration step is required. Please see the Community Docker Compose README.md](./tools/docker-community/README.md#migrating-data-manually) for information on how to migrate data from the old Local Docker install.
When Local Docker playbook was removed (`installer/install.yml`) and replaced with the Develoment Environment, we also moved from using bind-mounts, to volumes. As a result, when upgrading from AWX <17.0.1, an extra migration step is required. Please see the Development Environment docker-compose [README.md](./tools/docker-compose/README.md#migrating-data-from-local-docker) for information on how to migrate data from the old Local Docker install.

#### Deploying to a remote host

Expand Down Expand Up @@ -536,14 +536,20 @@ If you wish to use an external database, in the inventory file, set the value of

### Run the installer

After updating the inventory file with any custom values, run the make target from the root of your AWX clone.
First, build the container

```
make docker-compose-build
```

Then, after updating the inventory file with any custom values, run the make target from the root of your AWX clone.

```bash
# Run the AWX Community docker-compose make target
$ make run-awx
# Run the docker-compose make target
$ make docker-compose
```

> Note: If you want to use a custom image, see the docker-community [README.md](./tools/docker-community/README.md#building-your-own-image) for more information.
> Note: For more information, see the docker-compose [README.md](./tools/docker-compose/README.md) for more information.

### Post-install
Expand Down Expand Up @@ -616,19 +622,6 @@ The AWX web server is accessible on the deployment host, using the *host_port* v
You will prompted with a login dialog. The default administrator username is `admin`, and the password is `password`.


### Upgrading from previous versions

Upgrading AWX involves checking out the new source code and re-running the make target. Download a newer release from [https://github.com/ansible/awx/releases](https://github.com/ansible/awx/releases) and re-populate the inventory file with your customized variables.

After updating the inventory file with any custom values, run the make target from the root of your AWX clone.


```bash
# Run the AWX Community docker-compose make target
$ make run-awx
```


# Installing the AWX CLI

`awx` is the official command-line client for AWX. It:
Expand Down
32 changes: 22 additions & 10 deletions tools/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Overview

Here are the main make targets and files:
Here are the main make targets:

* `docker-compose-build` - used for building the development image, which is used by both `docker-compose` and `docker-compose-community`.
* `docker-compose-build` - used for building the development image, which is used by both `docker-compose`
* `docker-compose` - Make target for development, passes awx_devel image and tag.
* `docker-compose-community` - uses awx_devel image published to quay.io.

Notable files:
* `tools/docker-compose/inventory` file - used to configure the local AWX development deployment.
* `migrate.yml` - playbook for migrating data from Local Docker to the Development Environment.

Expand Down Expand Up @@ -77,7 +78,7 @@ $ ansible-playbook migrate.yml -e "migrate_local_docker=true" -e "postgres_data_

2. Change directory to the top of your awx checkout and start your containers
```bash
$ make docker-compose-community
$ make docker-compose
```

3. After ensuring your data has been successfully migrated, you may delete your old data directory (typically stored at `~/.awx/pgdocker`).
Expand All @@ -98,28 +99,39 @@ $ make docker-compose-community
$ docker -f rm awx_postgres
```

3. Template the new docker-community compose
3. Template the new docker-compose.yml
```bash
$ ansible-playbook -i tools/ansible/inventory tools/ansible/sources.yml
```

4. Start a container with a volume (using the new tools/docker-community/docker-compose-community.yml)
4. Start a container with a volume (using the new tools/docker-compose/_sources/docker-compose.yml)
```bash
$ docker-compose -f ../docker-community/docker-compose-community.yml up postgres
$ docker-compose -f ../docker-compose/_sources/docker-compose.yml up postgres
```

5. Restore to new `awx_postgres`
```bash
$ docker-compose -f ../docker-community/docker-compose-community.yml exec -T postgres psql -U awx -d awx -p 5432 < awx_dump.sql
$ docker-compose -f ../docker-compose/_sources/docker-compose.yml exec -T postgres psql -U awx -d awx -p 5432 < awx_dump.sql
```

6. Run the docker-community compose to start the containers
6. Run the docker-compose.yml to start the containers
```bash
$ docker-compose -f ../docker-community/docker-compose-community.yml up task
$ docker-compose -f ../docker-compose/_sources/docker-compose.yml up task
```

7. Check to ensure your data migration was successful, then you can delete your the `awx_dump.sql` backup and your old data directory.


### Upgrading the Development Environment

Upgrading AWX involves checking out the new source code and re-running the make target. Download a newer release from [https://github.com/ansible/awx/releases](https://github.com/ansible/awx/releases) and re-populate the inventory file with your customized variables.

After updating the inventory file with any custom values, run the make target from the root of your AWX clone.


```bash
$ make docker-compose
```

## Extras
* [Using Logstash](./docs/logstash.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

# Migrate data from old Local Docker to a new Docker Compose Community install
# Migrate data from old Local Docker to a fresh development environment
- name: Remove awx_postgres to ensure consistent start state
shell: |
docker rm -f awx_postgres
Expand All @@ -23,14 +23,14 @@
state: absent
ignore_errors: true

- name: Start docker-community postgres container
- name: Start dev env postgres container
shell: |
docker-compose -f ../docker-community/docker-compose-community.yml up -d postgres
docker-compose -f ../docker-compose/_sources/docker-compose.yml up -d postgres
- name: Start Community Compose database container
docker_compose:
project_src: "../docker-community"
files: "docker-compose-community.yml"
project_src: "../docker-compose/_sources"
files: "docker-compose.yml"
services:
- postgres
state: present
Expand All @@ -42,7 +42,7 @@

- name: Restore to new postgres container
shell: |
docker-compose -f ../docker-community/docker-compose-community.yml exec -T postgres psql -U {{ pg_username }} -d {{ pg_database }} -p {{ pg_port }} < awx_dump.sql
docker-compose -f ../docker-compose/_sources/docker-compose.yml exec -T postgres psql -U {{ pg_username }} -d {{ pg_database }} -p {{ pg_port }} < awx_dump.sql
- name: Clean up temporary awx db dump
file:
Expand Down

0 comments on commit f9271b1

Please sign in to comment.