Skip to content

Commit 3d0faf7

Browse files
authored
Merge pull request #4621 from project-koku/release_prod-hccm.76440
Deployment commit for prod-hccm
2 parents b93b25a + d7a7652 commit 3d0faf7

File tree

9 files changed

+130
-102
lines changed

9 files changed

+130
-102
lines changed

.github/workflows/tag_release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ on:
33
push:
44
branches:
55
- prod-hccm
6+
- prod-ros
67
jobs:
78
tag_release:
89
runs-on: ubuntu-latest
910
steps:
1011
- uses: actions/checkout@v5
1112
with:
12-
ref: prod-hccm
13+
ref: ${{ github.head_ref || github.ref_name }}
1314
- run: |
1415
git fetch --prune --unshallow
1516
- name: Tag this release

CODEOWNERS

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
* @project-koku/koku-ui-hccm
2+
3+
# shared libs
4+
/libs/ @project-koku/koku-ui-hccm @project-koku/koku-ui-ros @project-koku/koku-ui-onprem
5+
6+
# On-prem apps
7+
/apps/koku-ui-onprem/ @project-koku/koku-ui-onprem
8+
9+
# SaaS apps
10+
/apps/koku-ui-hccm/ @project-koku/koku-ui-hccm
11+
/apps/koku-ui-ros/ @project-koku/koku-ui-ros
12+
13+
# tekton hccm
14+
/.tekton/koku-ui-hccm-pull-request.yaml @project-koku/koku-ui-hccm
15+
/.tekton/koku-ui-hccm-push.yaml @project-koku/koku-ui-hccm
16+
17+
# tekton ros
18+
/.tekton/koku-ui-ros-pull-request.yaml @project-koku/koku-ui-ros
19+
/.tekton/koku-ui-ros-push.yaml @project-koku/koku-ui-ros

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Monorepo for Cost Management related user interfaces
99
Submit issues in [Jira].
1010

1111
For specific instructions look at app's README. Available apps:
12-
- [koku-ui-hccm]
13-
- [koku-ui-ros]
12+
- [koku-ui-hccm][koku-ui-hccm-readme]
13+
- [koku-ui-ros][koku-ui-ros-readme]
1414

1515
[build-badge]: https://github.com/project-koku/koku-ui/actions/workflows/ci.yml/badge.svg?branch=main
1616
[codecov-badge]: https://codecov.io/gh/project-koku/koku-ui/graph/badge.svg?token=1hjFIy1cRe
1717
[Jira]: https://issues.redhat.com/projects/COST/
18-
[koku-ui-hccm]: https://github.com/project-koku/koku-ui/apps/koku-ui-hccm
19-
[koku-ui-ros]: https://github.com/project-koku/koku-ui/apps/koku-ui-ros
18+
[koku-ui-hccm-readme]: https://github.com/project-koku/koku-ui/blob/main/apps/koku-ui-hccm/README.md
19+
[koku-ui-ros-readme]: https://github.com/project-koku/koku-ui/blob/main/apps/koku-ui-ros/README.md
2020
[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui.svg?longCache=true

apps/koku-ui-hccm/README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ sudo bash scripts/patch-etc-hosts.sh
4343
3. Clone the repository, and open a terminal in the base of this project.
4444
4. Run the command `npm install` to install all the dependencies.
4545

46-
## Building
46+
## Building apps/koku-ui-hccm
4747
```
4848
npm build
4949
```
5050

51-
## Testing
51+
## Testing apps/koku-ui-hccm
5252
```
5353
npm test
5454
```
@@ -57,7 +57,7 @@ npm test
5757

5858
Note that this approach currently supports the Insights stage and prod environments.
5959

60-
1. Start development server
60+
1. Start development server in apps/koku-ui-hccm
6161
```
6262
npm start
6363
```
@@ -82,50 +82,50 @@ Refer to the [serving files locally][serving-files-locally] section of cloud ser
8282
make dev-static-node
8383
```
8484

85-
2. Start development server in Koku UI repo
85+
2. Start development server for Koku UI in apps/koku-ui-hccm
8686
```
8787
npm start:csb
8888
```
8989

90-
### Running Koku UI with local Koku microfrontend (MFE)
90+
### Running Koku UI with local ROS UI
9191

92-
Refer to the [koku-ui-mfe README][koku-ui-mfe-readme] for more details
92+
Refer to the [koku-ui-ros README][koku-ui-ros-readme] for more details
9393

94-
1. Start development server in Koku MFE repo
94+
1. Start development server in apps/koku-ui-ros
9595
```
9696
npm start:static
9797
```
9898

99-
2. Start development server in Koku UI repo
99+
2. Start development server in apps/koku-ui-hccm
100100
```
101-
npm start:mfe
101+
npm start:ros
102102
```
103103

104-
### Running Koku UI with local Koku microfrontend (MFE) and Cloud Services Backend
104+
### Running Koku UI with local ROS UI and Cloud Services Backend
105105

106-
Refer to the [serving files locally][serving-files-locally] section of cloud services config and the [koku-ui-mfe README][koku-ui-mfe-readme] for more details
106+
Refer to the [serving files locally][serving-files-locally] section of cloud services config and the [koku-ui-ros README][koku-ui-ros-readme] for more details
107107

108108
1. Serve files locally from Cloud Services Backend repo
109109
```
110110
make dev-static-node
111111
```
112112

113-
2. Start development server in Koku MFE repo
113+
2. Start development server in apps/koku-ui-ros
114114
```
115115
npm start:static
116116
```
117117

118-
3. Start development server in Koku UI repo
118+
3. Start development server in apps/koku-ui-hccm
119119
```
120-
npm start:csb:mfe
120+
npm start:csb:ros
121121
```
122122

123123
## Running local instances of Koku UI and Koku API
124124
#### Koku UI
125125

126126
Note that this approach currently supports the Insights stage and prod environments.
127127

128-
1. Start development server
128+
1. Start development server in apps/koku-ui-hccm
129129
```
130130
npm start
131131
```
@@ -209,7 +209,7 @@ This [RELEASE][release-doc] doc describes how to release Koku UI to each staging
209209
[codecov-badge]: https://codecov.io/gh/project-koku/koku-ui/graph/badge.svg?token=1hjFIy1cRe
210210
[Jira]: https://issues.redhat.com/projects/COST/
211211
[koku-readme]: https://github.com/project-koku/koku#readme
212-
[koku-ui-mfe-readme]: https://github.com/project-koku/koku-ui-mfe#readme
212+
[koku-ui-ros-readme]: https://github.com/project-koku/koku-ui/blob/main/apps/koku-ui-ros/README.md
213213
[license-badge]: https://img.shields.io/github/license/project-koku/koku-ui.svg?longCache=true
214214
[nodejs]: https://nodejs.org/en/
215215
[npm]: https://www.npmjs.com/

apps/koku-ui-hccm/RELEASE.md

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,36 @@
11
# Releasing Koku UI
22

3-
This doc describes how to release Koku UI to each staging environment. Note that this should be done in order for testing purposes; stage-stable, prod-beta, and finally prod-stable
3+
This doc describes how to release Koku UI to each staging environment. Note that this should be done in order for testing purposes.
44

55
## Release script
66

77
The release script creates a PR with a unique SHA, used for a namespace \`ref\` in the app-interface repo. The script also ensures that code is always pulled from the correct branches. For example, we always:
88

9-
1. Pull from master when pushing to stage-stable
10-
2. Pull from stage-stable when pushing to prod-beta
11-
3. Pull from prod-beta when pushing to prod-stable
9+
1. Pull from master when pushing to prod-hccm
1210

13-
Please allow the PR to build successfully and merge before running the script again for the next branch.
11+
Note: Pushing to master automatically deploys to the stage.
1412

15-
### Release to stage-stable
13+
Please allow the PR to build successfully and merge before running the script again.
1614

17-
```
18-
sh scripts/release-branch.sh -s
19-
```
20-
21-
### Release to prod-beta
22-
23-
```
24-
sh scripts/release-branch.sh -b
25-
```
26-
27-
### Release to prod-stable
15+
### Release to prod-hccm
2816

2917
```
3018
sh scripts/release-branch.sh -p
3119
```
3220

3321
## Deployment
3422

35-
After all PRs have been merged, update the \`hccm-frontend\` resource in https://gitlab.cee.redhat.com/service/app-interface/-/blob/master/data/services/insights/hccm/deploy-clowder.yml
23+
After all PRs have been merged, update the \`koku-ui-hccm\` resource in https://gitlab.cee.redhat.com/service/app-interface/-/blob/master/data/services/insights/hccm/deploy-clowder.yml
3624

3725
Use the latest commit of each branch to update namespaces \`ref\` in the app-interface repo. Don't use a merge commit, SHAs must be unique when images are created for each branch.
3826

3927
```
40-
- name: hccm-frontend
28+
- name: koku-ui-hccm
4129
...
42-
# Stage Stable Deployment
43-
- namespace:
44-
$ref: /services/insights/frontend-operator/namespaces/stage-frontends.yml
45-
ref: 4bdd960da2fe34ed8964acfcbc2d3267a752f3e5 // Replace with latest SHA for stage-beta branch
46-
...
47-
# Prod Beta Deployment
48-
- namespace:
49-
$ref: /services/insights/frontend-operator/namespaces/prod-beta-frontends.yml
50-
ref: 23909da4ea017963caa78d59168054db842ce014 // Replace with latest SHA for prod-beta branch
51-
...
5230
# Prod Stable Deployment
5331
- namespace:
5432
$ref: /services/insights/frontend-operator/namespaces/prod-frontends.yml
55-
ref: c7f6c75fd1e895afbc05a2a6d26835fa16a0edfa // Replace with latest SHA for prod-stable branch
33+
ref: c7f6c75fd1e895afbc05a2a6d26835fa16a0edfa // Replace with latest SHA for prod-hccm branch
5634
...
5735
```
5836

@@ -62,17 +40,16 @@ After releasing to each staging environment, open an incognito window and view o
6240

6341
Please ensure expected changes have been updated before releasing to the next staging environment.
6442

65-
1. For stage-stable, view https://console.stage.redhat.com/openshift/cost-management/
66-
2. For prod-beta, view https://console.redhat.com/beta/openshift/cost-management/
67-
3. For prod-stable, view https://console.redhat.com/openshift/cost-management/
43+
1. For stage, view https://console.stage.redhat.com/openshift/cost-management/
44+
2. For prod-hccm, view https://console.redhat.com/openshift/cost-management/
6845

6946
## Release notes
7047

71-
After releasing to prod-stable, a new tag will be created here https://github.com/project-koku/koku-ui/tags. Create a new GitHub release based on this tag -- use the tag label as the "release title".
48+
After releasing to prod-hccm, a new tag will be created here https://github.com/project-koku/koku-ui/tags. Create a new GitHub release based on this tag -- use the tag label as the "release title".
7249

7350
Note that you may "Draft a new release", before the latest tag is available, and mark it as a "pre-release" -- don't click "publish release" yet, use "save draft".
7451

75-
Please document any new features and bug fixes available in production and other staging environments. For example, note any features that are only available in stage-beta.
52+
Please document any new features and bug fixes available in production and other staging environments. For example, note any features that are only available in stage.
7653

7754
For release examples, please see existing releases here https://github.com/project-koku/koku-ui/releases
7855

apps/koku-ui-onprem/Containerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM registry.redhat.io/ubi10/nodejs-22-minimal AS builder
2+
WORKDIR /app
3+
4+
USER 0
5+
6+
COPY package.json ./
7+
COPY package-lock.json ./
8+
COPY tsconfig.json ./
9+
COPY apps/koku-ui-onprem/package.json ./apps/koku-ui-onprem/
10+
COPY libs ./libs
11+
12+
RUN npm ci
13+
14+
COPY apps/koku-ui-onprem ./apps/koku-ui-onprem/
15+
RUN npm run build --workspace=@koku-ui/koku-ui-onprem
16+
17+
USER 1001
18+
19+
FROM registry.redhat.io/ubi10/nginx-126
20+
21+
COPY apps/koku-ui-onprem/nginx.conf.template /tmp/nginx.conf.template
22+
COPY --from=builder /app/apps/koku-ui-onprem/dist .
23+
24+
EXPOSE 8080
25+
CMD ["/bin/sh", "-c", "envsubst '\\$API_PROXY_URL' < /tmp/nginx.conf.template > ${NGINX_DEFAULT_CONF_PATH}/nginx.conf && exec nginx -g 'daemon off;'"]
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
location /api {
2+
proxy_pass ${API_PROXY_URL};
3+
4+
proxy_set_header Authorization "Bearer $http_x_forwarded_access_token";
5+
proxy_set_header Host $host;
6+
proxy_set_header X-Real-IP $remote_addr;
7+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
8+
9+
proxy_http_version 1.1;
10+
proxy_set_header Connection "";
11+
}
12+
13+
location / {
14+
try_files $uri $uri/ /index.html;
15+
add_header X-Frame-Options "SAMEORIGIN";
16+
add_header X-Content-Type-Options "nosniff";
17+
add_header Referrer-Policy "strict-origin-when-cross-origin";
18+
}

apps/koku-ui-ros/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Koku microfrontend (MFE) with Module Federation
1+
# ROS UI
22

33
[![Apache 2.0][license-badge]](https://github.com/project-koku/koku-ui/blob/main/LICENSE)
44
[![CI Status][build-badge]](https://github.com/project-koku/koku-ui/actions/workflows/ci.yml?query=branch%3Amain)
55
[![codecov][codecov-badge]](https://codecov.io/gh/project-koku/koku-ui)
66

7-
React.js app for Cost Management.
7+
React.js app for Resource Optimization with Module Federation.
88

99
User interface is based on [Patternfly].
1010

@@ -43,21 +43,21 @@ sudo bash scripts/patch-etc-hosts.sh
4343
3. Clone the repository, and open a terminal in the base of this project.
4444
4. Run the command `npm install` to install all the dependencies.
4545

46-
## Building
46+
## Building apps/koku-ui-ros
4747
```
4848
npm build
4949
```
5050

51-
## Testing
51+
## Testing apps/koku-ui-ros
5252
```
5353
npm test
5454
```
5555

56-
## Running Koku MFE against a hosted Koku API, using webpack proxy
56+
## Running ROS UI against a hosted Koku API, using webpack proxy
5757

5858
Note that this approach currently supports only the Insights stage environment.
5959

60-
1. Start development server
60+
1. Start development server in apps/koku-ui-ros
6161
```
6262
npm start
6363
```
@@ -73,7 +73,7 @@ https://stage.foo.redhat.com:1337/staging/cost-management
7373

7474
Note: Must log in with a user that has Cost Management permissions
7575

76-
### Running Koku MFE with local Cloud Services Backend
76+
### Running ROS UI with local Cloud Services Backend
7777

7878
Refer to the [serving files locally][serving-files-locally] section of cloud services config for more details
7979

@@ -82,26 +82,26 @@ Refer to the [serving files locally][serving-files-locally] section of cloud ser
8282
make dev-static-node
8383
```
8484

85-
2. Start development server in Koku MFE repo
85+
2. Start development server in apps/koku-ui-ros
8686
```
8787
npm start:csb
8888
```
8989

90-
### Running Koku MFE with local Koku UI
90+
### Running ROS UI with local Koku UI
9191

9292
Refer to the [koku-ui README][koku-ui-readme] for more details
9393

94-
1. Start development server in Koku MFE repo
94+
1. Start development server in apps/koku-ui-ros
9595
```
9696
npm start:static
9797
```
9898

99-
2. Start development server in Koku UI repo
99+
2. Start development server in apps/koku-ui-hccm
100100
```
101-
npm start:mfe
101+
npm start:ros
102102
```
103103

104-
### Running Koku MFE with local Koku UI and Cloud Services Backend
104+
### Running ROS UI with local Koku UI and Cloud Services Backend
105105

106106
Refer to the [serving files locally][serving-files-locally] section of cloud services config and the [koku-ui README][koku-ui-readme] for more details
107107

@@ -110,19 +110,19 @@ Refer to the [serving files locally][serving-files-locally] section of cloud ser
110110
make dev-static-node
111111
```
112112

113-
2. Start development server in Koku MFE repo
113+
2. Start development server in apps/koku-ui-ros
114114
```
115115
npm start:static
116116
```
117117

118-
3. Start development server in Koku UI repo
118+
3. Start development server in apps/koku-ui-ros
119119
```
120-
npm start:csb:mfe
120+
npm start:csb:ros
121121
```
122122

123-
## Releasing Koku MFE
123+
## Releasing ROS UI
124124

125-
This [RELEASE][release-doc] doc describes how to release Koku MFE to each staging environment.
125+
This [RELEASE][release-doc] doc describes how to release ROS UI to each staging environment.
126126

127127
[build-badge]: https://github.com/project-koku/koku-ui/actions/workflows/ci.yml/badge.svg?branch=main
128128
[codecov-badge]: https://codecov.io/gh/project-koku/koku-ui/graph/badge.svg?token=1hjFIy1cRe

0 commit comments

Comments
 (0)