Skip to content

Commit bf80bc5

Browse files
committed
Partial merge
2 parents d82b908 + 88f69ad commit bf80bc5

File tree

11 files changed

+48
-304
lines changed

11 files changed

+48
-304
lines changed

docs/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
- [Data Analysis](contributing/data-analysis.md)
1010
- [Operations Support](contributing/operations-support.md)
1111
- Operations
12-
- [Release Process](./operations/release-process.md)
12+
- [Preparing a new release](./operations/prepare-new-chime-release.md)
13+
- [Release Process](./operations/release=process.md)
1314
- [The `chime-live` Cluster](./operations/chime-live-cluster.md)
1415
- [Deploy to Heroku](./operations/heroku.md)
1516
- [Deploy with Chef Habitat](./operations/habitat.md)

docs/operations/chime-live-cluster.md

Lines changed: 1 addition & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -28,89 +28,4 @@
2828

2929
```bash
3030
kubectl get pod --all-namespaces
31-
```
32-
33-
## Deploying a New CHIME Version
34-
35-
1. [Create a new release](release-process.md)
36-
2. Wait for the `Docker` GitHub Actions workflow to complete
37-
3. Verify the new version shows up at the top as "Latest version" here: https://github.com/CodeForPhilly/chime/packages/155340
38-
4. Open a new issue on GitHub titled "Deploy chime $VERSION" (ex: https://github.com/CodeForPhilly/chime/issues/98)
39-
* Note the PR in which the release was approved
40-
* Confirm that the tag for the version was created
41-
5. Create a local branch (based on "develop") to perform deploy time changed on, named "deploy/$VERSION"
42-
43-
```bash
44-
VERSION=1.2.3
45-
git rev-parse --abbrev-ref HEAD
46-
# develop
47-
git pull
48-
git checkout -b deploy/$VERSION
49-
```
50-
51-
6. Update the app.yaml manifest file
52-
53-
```bash
54-
VERSION=1.2.3
55-
sed -Ei "s/(- image: .*):(.*)/\1:$VERSION/" k8s/app.yaml
56-
git add -A
57-
# verify changes are as expected
58-
git diff --staged
59-
git commit -m "Deploy chime $VERSION"
60-
```
61-
62-
7. Push changes
63-
64-
```bash
65-
VERSION=1.2.3
66-
git push -u origin deploy/$VERSION
67-
```
68-
69-
8. Open PR on GitHub to merge changes back into develop, ideally with
70-
the review of another DevOps admin whenever possible. Ensure to link
71-
to the PR in the deployment issue previously opened on GitHub.
72-
73-
9. Run:
74-
75-
```bash
76-
kubectl apply -f k8s/app.yaml
77-
```
78-
79-
10. Watch rollout status:
80-
81-
```bash
82-
kubectl -n chime rollout status deployment.v1.apps/chime
83-
```
84-
85-
11. Confirm the expected version is running
86-
87-
```bash
88-
kubectl -n chime get deployment chime -o yaml | grep image:
89-
# - image: docker.pkg.github.com/codeforphilly/chime/penn-chime:$VERSION
90-
```
91-
92-
12. Paste the output from steps 11 & 12 into the previously opened deployment issue
93-
to document the successful deployment and close the issue
94-
13. $$$ PROFIT $$$
95-
96-
## Applying Changes to `k8s/` Manifests
97-
98-
After making changes to the manifests in `k8s/` that you want to apply, first review the diff for what you're about to change using an editor that wil color-code the output and make it easy to review:
99-
100-
```bash
101-
kubectl diff -Rf k8s/ | code -
102-
```
103-
104-
*Ignore any instances of `generation` being incremented*
105-
106-
Once you're satisfied with the results of the diff, you can apply a single manifest:
107-
108-
```bash
109-
kubectl apply -f k8s/infra/ingress-nginx.yaml
110-
```
111-
112-
Or the entire directory:
113-
114-
```bash
115-
kubectl apply -Rf k8s/
116-
```
31+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Operations: Prepare New Chime Release
2+
3+
At the end of following this process you will have deployed a new CHIME version to https://penn-chime.phl.io
4+
5+
## Start Here
6+
7+
## Prepare Chime on the Develop Branch
8+
9+
1. Open a new issue on GitHub titled "Deploy chime $VERSION" (ex: https://github.com/CodeForPhilly/chime/issues/98)
10+
* Note the PR in which the release was approved
11+
* Confirm that the tag for the version was created
12+
2. Create a local branch (based on "develop") to perform deploy time changed on, named "deploy/$VERSION"
13+
14+
```bash
15+
export VERSION=x.x.x #set this to the release version you are releasing. (export VERSION=1.1.1 for version 1.1.1)
16+
git checkout develop
17+
git pull
18+
git checkout -b deploy/$VERSION # this will ultimately create a branch deploy/1.1.1 (from the reference above)
19+
```
20+
21+
3. Update the app.yaml manifest file using an editor. You will need to change the line that has: ```- image: docker.pkg.github.com/codeforphilly/chime/penn-chime:<insert versions here>```
22+
* After that is complete, update your branch.
23+
24+
```bash
25+
git add k8s/app.yml
26+
git diff --staged
27+
git commit -m "Deploy chime $VERSION"
28+
```
29+
30+
4. Push changes
31+
32+
```bash
33+
git push -u origin deploy/$VERSION
34+
```
35+
36+
5. [Open PR on GitHub](https://github.com/CodeForPhilly/chime/compare) to merge changes back into develop, ideally with
37+
the review of another DevOps admin whenever possible. Ensure to link
38+
to the PR in the deployment issue previously opened on GitHub.
39+
40+
6. One approved you will need to [create a release to auto deploy](release-process.md)

docs/operations/release-process.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Operations: Release Process
22

3-
1. Merge pull requests into `develop`
4-
2. Chose a new version number by incrementing the previous release according to [semver](https://semver.org/)
5-
- Do not bump the MAJOR version unless the team is ready to create a new `releases/v#` branch
6-
3. Open a pull request to merge `develop` into `releases/v1`
3+
1. Open a pull request to merge `develop` into `releases/v1`
74
- **Title**: `Release: CHIME v1.#.#`
85
- **Description**: Generate with this command:
96

@@ -21,5 +18,4 @@
2118
6. [Create a new release against `releases/v1`](https://github.com/CodeForPhilly/chime/releases/new?target=releases/v1)
2219
- **Tag version:** `v1.#.#`
2320
- **Release Title:** `CHIME v1.#.#`
24-
- **Description:** Copy release notes from pull request
25-
7. [Deploy to the `chime-live` cluster](chime-live-cluster.md)
21+
- **Description:** Copy release notes from pull request

src/app.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from penn_chime.presentation import (
77
display_download_link,
88
display_header,
9-
display_more_info,
109
display_sidebar,
1110
hide_menu_style,
1211
write_definitions,
@@ -34,10 +33,6 @@
3433

3534
display_header(st, m, p)
3635

37-
if st.checkbox("Show more info about this tool"):
38-
notes = "The total size of the susceptible population will be the entire catchment area for our hospitals."
39-
display_more_info(st=st, model=m, parameters=p, defaults=d, notes=notes)
40-
4136
st.subheader("New Admissions")
4237
st.markdown("Projected number of **daily** COVID-19 admissions. \n\n _NOTE: Now including estimates of prior admissions for comparison._")
4338
admits_chart = build_admits_chart(alt=alt, admits_floor_df=m.admits_floor_df, max_y_axis=p.max_y_axis)

src/chime_dash/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from chime_dash.app.utils.callbacks import wrap_callbacks
1313

1414
DashAppInstance = TypeVar('DashAppInstance')
15-
DEFAULTS = get_defaults()
1615

1716

1817
def create_app(context: str = 'prod') -> DashAppInstance:
@@ -32,8 +31,7 @@ def create_app(context: str = 'prod') -> DashAppInstance:
3231
Env = from_object(context)
3332

3433
LANGUAGE = Env.LANG
35-
body = Root(LANGUAGE, DEFAULTS)
36-
34+
body = Root(LANGUAGE, get_defaults())
3735

3836
App = Dash(
3937
__name__,
@@ -45,7 +43,4 @@ def create_app(context: str = 'prod') -> DashAppInstance:
4543
App.layout = body.html
4644
wrap_callbacks(App)
4745

48-
49-
5046
return Env, App
51-

src/chime_dash/app/components/tool_details.py

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

src/chime_dash/app/pages/index.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from chime_dash.app.components.base import Page
1010
from chime_dash.app.components.footer import Footer
1111
from chime_dash.app.components.header import Header
12-
from chime_dash.app.components.tool_details import ToolDetails
1312
from chime_dash.app.components.intro import Intro
1413
from chime_dash.app.components.visualizations import Visualizations
1514
from chime_dash.app.services.callbacks import IndexCallbacks
@@ -27,7 +26,6 @@ def __init__(self, language, defaults):
2726
self.components = OrderedDict(
2827
header=Header(language, defaults),
2928
intro=Intro(language, defaults),
30-
tool_details=ToolDetails(language, defaults),
3129
visualizations=Visualizations(language, defaults),
3230
footer=Footer(language, defaults),
3331
)
@@ -44,7 +42,6 @@ def get_html(self):
4442
children=[Container(
4543
children=self.components["header"].html
4644
+ self.components["intro"].html
47-
+ self.components["tool_details"].html
4845
)]
4946
+ self.components["visualizations"].html
5047
+ [Container(

src/chime_dash/app/pages/sidebar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
},
9191
max_y_axis_value={"type": "number", "min": 10, "step": 10, "value": None},
9292
show_tables={"type": "switch", "value": False},
93-
show_tool_details={"type": "switch", "value": False},
9493
))
9594

9695

src/chime_dash/app/templates/en/tool-details.md

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

0 commit comments

Comments
 (0)