-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
923 additions
and
310 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,7 +193,7 @@ These instructions assume that you will be working with dockerized services. | |
First add the following line to your `.env` file: | ||
|
||
```sh | ||
(hip)$ echo "DATABASE_URL=postgres://[email protected]:5433/hip" >> .env | ||
(hip)$ echo "DATABASE_URL=postgres://[email protected]:5432/hip" >> .env | ||
``` | ||
|
||
The `docker-compose.yml` sets up environment variables in a file, ``.postgres``. | ||
|
@@ -294,3 +294,22 @@ To reset your local database from a deployed environment: | |
As mentioned in the Database setup instructions, you may need to visit | ||
[/cms/sites](http://localhost:8000/cms/sites/) and change the first entry's | ||
`Hostname` field to `localhost` to enable page previews in the Wagtail admin. | ||
|
||
### GitHub Actions Runner | ||
|
||
There are [GitHub Actions self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners) deployed in the Kubernetes cluster along side the application. | ||
|
||
Setup instructions: | ||
|
||
* Obtain a [GitHub PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the `repo` scope that's valid for one week (it needs to be active only for the initial deployment). Add this to a local environment variable `RUNNER_CFG_PAT`: | ||
|
||
```sh | ||
export RUNNER_CFG_PAT="gh......" | ||
``` | ||
|
||
* Run the playbook to deploy the runner: | ||
|
||
```sh | ||
cd deploy/ | ||
ansible-playbook deploy-runner.yml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
- name: Install Actions Runner Controller and configure runner scale set | ||
hosts: cluster | ||
vars: | ||
ansible_connection: local | ||
ansible_python_interpreter: "{{ ansible_playbook_python }}" | ||
runner_namespace: github-runner | ||
chart_version: "0.9.3" | ||
gather_facts: false | ||
tasks: | ||
# https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/quickstart-for-actions-runner-controller | ||
# | ||
# Ansible task to automate: | ||
# helm install arc \ | ||
# --namespace "${NAMESPACE}" \ | ||
# --create-namespace \ | ||
# oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller | ||
- name: Installing Actions Runner Controller | ||
kubernetes.core.helm: | ||
context: "{{ k8s_context|mandatory }}" | ||
chart_ref: oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set-controller | ||
chart_version: "{{ chart_version }}" | ||
release_name: arc | ||
release_namespace: "{{ runner_namespace }}" | ||
create_namespace: true | ||
wait: yes | ||
|
||
# Ansible task to automate: | ||
# helm install "${INSTALLATION_NAME}" \ | ||
# --namespace "${NAMESPACE}" \ | ||
# --create-namespace \ | ||
# --set githubConfigUrl="https://github.com/caktus/philly-hip" \ | ||
# --set githubConfigSecret.github_token="${RUNNER_CFG_PAT}" \ | ||
# oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
- name: Configuring a runner scale set | ||
kubernetes.core.helm: | ||
context: "{{ k8s_context|mandatory }}" | ||
chart_ref: oci://ghcr.io/actions/actions-runner-controller-charts/gha-runner-scale-set | ||
chart_version: "{{ chart_version }}" | ||
release_name: arc-runner-set | ||
release_namespace: "{{ runner_namespace }}" | ||
create_namespace: true | ||
release_values: | ||
githubConfigUrl: "https://github.com/caktus/philly-hip" | ||
githubConfigSecret: | ||
github_token: "{{ lookup('env', 'RUNNER_CFG_PAT') }}" | ||
wait: yes |
Oops, something went wrong.