Skip to content

Commit 08f290b

Browse files
authored
Update galaxy_ng dev env (#5463)
ref: ansible/galaxy_ng#2445 Issue: AAP-32608 Signed-off-by: Fabricio Aguiar <[email protected]> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent 3de18f5 commit 08f290b

File tree

8 files changed

+37
-53
lines changed

8 files changed

+37
-53
lines changed

.github/workflows/cypress.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -85,37 +85,23 @@ jobs:
8585
ref: '${{ env.SHORT_BRANCH }}'
8686
path: 'galaxy_ng'
8787

88-
- name: "Checkout oci_env (main)"
89-
uses: actions/checkout@v4
90-
with:
91-
repository: 'pulp/oci_env'
92-
path: 'oci_env'
93-
94-
- name: "Configure oci_env"
95-
working-directory: 'oci_env'
96-
run: |
97-
pip install --editable ./client/
98-
# merge common, profile-specific and test matrix specific config
99-
cat ../ansible-hub-ui/.github/workflows/cypress/compose.env.common \
100-
../ansible-hub-ui/.github/workflows/cypress/compose.env."$BACKEND_FLAVOR" \
101-
../ansible-hub-ui/test/cypress/e2e/"${{ matrix.test }}"/compose.env \
102-
| sed 's/^\s\+//' | tee compose.env || [ -s compose.env ]
103-
104-
# oci-env compose build: FileNotFoundError: [Errno 2] No such file or directory: 'docker-compose'
88+
# docker compose build: FileNotFoundError: [Errno 2] No such file or directory: 'docker-compose'
10589
- name: "Provide docker-compose"
10690
run: |
10791
mkdir -p /home/runner/.local/bin/
10892
cd /home/runner/.local/bin/
10993
( echo '#!/bin/sh' ; echo 'docker compose "$@"' ) > docker-compose
11094
chmod +x docker-compose
11195
112-
- name: "oci-env compose build"
113-
working-directory: 'oci_env'
114-
run: 'oci-env compose build'
96+
- name: "galaxy compose build"
97+
run: |
98+
cd galaxy_ng
99+
DEV_SOURCE_PATH=galaxy_ng docker compose -f dev/compose/${{ env.BACKEND_FLAVOR }}.yaml build
115100
116-
- name: "oci-env compose up"
117-
working-directory: 'oci_env'
118-
run: 'oci-env compose up &'
101+
- name: "galaxy compose up"
102+
run: |
103+
cd galaxy_ng
104+
DEV_SOURCE_PATH=galaxy_ng docker compose -f dev/compose/${{ env.BACKEND_FLAVOR }}.yaml up &
119105
120106
- name: "Install node 20"
121107
uses: actions/setup-node@v4
@@ -311,8 +297,20 @@ jobs:
311297
312298
- name: "Kill container, show debug info"
313299
if: always()
314-
working-directory: 'oci_env'
315300
run: |
316-
oci-env exec bash -c "pip3 list && pip3 install pipdeptree && pipdeptree"
317-
oci-env compose logs
318-
oci-env compose kill
301+
docker ps -a
302+
echo ::group::MANAGER_LOGS
303+
docker logs compose-manager-1
304+
echo ::endgroup::
305+
echo ::group::WORKER_LOGS
306+
docker logs compose-worker-1
307+
echo ::endgroup::
308+
echo ::group::CONTENT_LOGS
309+
docker logs compose-content-1
310+
echo ::endgroup::
311+
echo ::group::API_LOGS
312+
docker logs compose-api-1
313+
echo ::endgroup::
314+
echo ::group::DEPENDENCIES
315+
docker exec compose-manager-1 bash -c "pip list && pip install pipdeptree && pipdeptree"
316+
echo ::endgroup::

.github/workflows/cypress/compose.env.common

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/cypress/compose.env.community

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/cypress/compose.env.standalone

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,24 @@ The project is built on React & Patternfly, using components from [patternfly-re
1111

1212
### Backend
1313

14-
The development version of the backend runs in a container, using the [pulp/oci\_env](https://github.com/pulp/oci_env) wrapper.
14+
The development version of the backend runs in a docker-compose.
1515

1616
Set up:
1717

1818
```
19-
git clone https://github.com/pulp/oci_env
2019
git clone https://github.com/ansible/galaxy_ng
2120
22-
pip install -e oci_env/client/
23-
oci-env # make sure oci-env is in PATH
2421
```
2522

2623
Run:
2724

2825
```
2926
cd galaxy_ng
30-
make oci/dab
27+
make compose/aap
3128
```
3229

33-
The backend can be run in multiple modes - `standalone`, `community`, `insights`, `keycloak`, `ldap` and `dab`.
34-
Depending on the mode, it will listen on http://localhost:5001 or http://localhost:55001, under `/api/galaxy/`, `/api/` or `/api/automation-hub/`.
30+
The backend can be run in multiple modes - `standalone`, `community`, `insights`, `certified-sync` and `aap`.
31+
Depending on the mode, it will listen on http://localhost:5001, under `/api/galaxy/`, `/api/` or `/api/automation-hub/`.
3532

3633
Or, use the [simplified compose stack](https://github.com/ansible/galaxy_ng/tree/master/dev/compose#galaxy-simplified-compose-stack).
3734

@@ -64,9 +61,9 @@ This app can be developed in standalone, community, or insights mode. Insights m
6461

6562
#### Modes
6663

67-
* `start-standalone`: assumes `oci/standalone` or `oci/dab`, http://localhost:8002/ui/ and http://localhost:55001/api/galaxy/
68-
* `start-community`: assumes `oci/community`, http://localhost:8002/ui/ and http://localhost:5001/api/
69-
* `start-insights`: assumes `oci/insights`, http://localhost:8002/preview/ansible/automation-hub/ and http://localhost:55001/api/automation-hub/
64+
* `start-standalone`: assumes `compose/standalone` or `compose/dab`, http://localhost:8002/ui/ and http://localhost:5001/api/galaxy/
65+
* `start-community`: assumes `compose/community`, http://localhost:8002/ui/ and http://localhost:5001/api/
66+
* `start-insights`: assumes `compose/insights`, http://localhost:8002/preview/ansible/automation-hub/ and http://localhost:5001/api/automation-hub/
7067
* **NOTE:** This option is only relevant to Red Hat employees.
7168

7269

config/insights.dev.webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const { webpackBase } = require('./webpack.base.config');
22

33
// Used for getting the correct host when running in a container
4-
const proxyTarget = process.env.API_PROXY || 'http://localhost:55001';
4+
const proxyTarget = process.env.API_PROXY || 'http://localhost:5001';
55

66
const cloudBeta = process.env.HUB_CLOUD_BETA; // "true" | "false" | undefined (=default)
77

88
module.exports = webpackBase({
9-
// The host where the API lives. EX: https://localhost:55001
9+
// The host where the API lives. EX: https://localhost:5001
1010
API_HOST: '',
1111

1212
// Path to the API on the API host. EX: /api/automation-hub

config/standalone.dev.webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const collectionRatings = require('../static/scores/collection.json');
44
const roleRatings = require('../static/scores/role.json');
55

66
// Used for getting the correct host when running in a container
7-
const proxyTarget = process.env.API_PROXY || 'http://localhost:55001';
7+
const proxyTarget = process.env.API_PROXY || 'http://localhost:5001';
88

99
const apiBasePath = process.env.API_BASE_PATH || '/api/galaxy/';
1010
const uiExternalLoginURI = process.env.UI_EXTERNAL_LOGIN_URI || '/login';
1111

1212
module.exports = webpackBase({
13-
// The host where the API lives. EX: https://localhost:55001
13+
// The host where the API lives. EX: https://localhost:5001
1414
API_HOST: '',
1515

1616
// Path to the API on the API host. EX: /api/automation-hub

test/cypress.env.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"uiPrefix": "/ui/",
55
"username": "admin",
66
"password": "admin",
7-
"containers": "localhost:55001",
7+
"containers": "localhost:5001",
88
"galaxykit": "galaxykit --ignore-certs"
99
}
1010

0 commit comments

Comments
 (0)