Skip to content

Commit

Permalink
chore: Remove Helm chart (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
microamp committed Aug 11, 2024
1 parent dd8571c commit acc8b99
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 1,026 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,6 @@ jobs:
push: true
tags: ${{ steps.buildvars.outputs.image_tags }}

- name: Set Helm Chart Version
env:
DEBIAN_FRONTEND: noninteractive
if: ${{ github.event.inputs.publish == 'true' }}
run: |
echo "Setting version ${{ steps.semver.outputs.nextStrict }}..."
sed -i -r -e "s|^version: .*$|version: '${{ steps.semver.outputs.nextStrict }}'|" helm/Chart.yaml
sed -i -r -e "s|^appVersion: ".*"$|appVersion: '${{ steps.semver.outputs.nextStrict }}'|" helm/Chart.yaml
- name: Package and Push Chart
if: ${{ github.event.inputs.publish == 'true' }}
run: |
helm plugin install https://github.com/chartmuseum/helm-push.git
helm repo add chartmuseum https://charts.ietf.org
helm cm-push --version="${{ steps.semver.outputs.nextStrict }}" --username="${{ secrets.HELM_REPO_USERNAME }}" --password="${{ secrets.HELM_REPO_PASSWORD }}" helm/ chartmuseum
helm repo remove chartmuseum
- name: Update CHANGELOG
id: changelog
uses: Requarks/changelog-action@v1
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/helm-checks.yml

This file was deleted.

165 changes: 0 additions & 165 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,168 +72,3 @@ Replace "`http://localhost:8001`" with the URL of your running website.
## Deploying

See the [deployment section](README.md#deployment)

## Running Kubernetes Locally

### Prerequisites

- `kubectl`

See [Install Tools](https://kubernetes.io/docs/tasks/tools/) (kubernetes.io) for more info.

- `minikube`

See [Install Tools](https://kubernetes.io/docs/tasks/tools/) (kubernetes.io) for more info.

- `helm`

See [Installing Helm](https://helm.sh/docs/intro/install/) (helm.sh) for more info.

- Docker image: `postgres`

``` bash
docker pull postgres:14.6-alpine
```

- Database backup: `www_backup_latest.gz`

``` bash
gunzip www_backup_latest.gz
```

Note: The name of your backup file will be different.

### Quick Start

1. Start a `minikube` cluster unless running already.

``` bash
minikube status
```

``` bash
minikube start
```

2. Run a PostgreSQL instance in a new container.

``` bash
docker run --name my-postgres \
--rm \
-v $(pwd)/www_backup_latest:/www_backup_latest \
-v pgdata:/var/lib/postgresql/data \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
postgres:14.6-alpine \
postgres -c log_statement=all
```

NOTE: With `log_statement=all`, it will output all queries hitting the database in stdout.

3. Start a new `bash` session in the container.

``` bash
docker exec -it 188fcfec0bf9 bash
```

where `188fcfec0bf9` is the ID of the container.

1. (Required only once) Using `psql`, create a new database called `www`, and a new role called `www_iab`.

``` bash
psql -U postgres
```

``` sql
CREATE DATABASE www;
CREATE ROLE www_iab WITH LOGIN PASSWORD 'www_iab';
```

``` text
\q
```

2. (Required only once) Restore `www_backup_latest` to the `www` database using `pg_restore`.

``` bash
pg_restore -U postgres -d www www_backup_latest
```

3. Check extensions installed in the `www` database.

``` bash
psql -U postgres
```

``` text
\c www
```

``` text
\dx
```

``` text
List of installed extensions
Name | Version | Schema | Description
--------------------+---------+------------+------------------------------------------------------------------------
adminpack | 2.1 | pg_catalog | administrative functions for PostgreSQL
amcheck | 1.3 | public | functions for verifying relation integrity
bloom | 1.0 | public | bloom access method - signature file based index
btree_gin | 1.3 | public | support for indexing common datatypes in GIN
btree_gist | 1.6 | public | support for indexing common datatypes in GiST
citext | 1.6 | public | data type for case-insensitive character strings
fuzzystrmatch | 1.1 | public | determine similarities and distance between strings
pageinspect | 1.9 | public | inspect the contents of database pages at a low level
pg_buffercache | 1.3 | public | examine the shared buffer cache
pg_freespacemap | 1.2 | public | examine the free space map (FSM)
pg_stat_statements | 1.9 | public | track planning and execution statistics of all SQL statements executed
pg_trgm | 1.6 | public | text similarity measurement and index searching based on trigrams
pg_visibility | 1.2 | public | examine the visibility map (VM) and page-level visibility info
pgrowlocks | 1.2 | public | show row-level locking information
pgstattuple | 1.5 | public | show tuple-level statistics
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(16 rows)
```
Notes:
- The `adminpack` extension is not available in RDS, therefore it will not be included in future database snapshots. See [Extensions supported for RDS for PostgreSQL 14](https://docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-extensions.html#postgresql-extensions-14x) for more information.
- The extensions above are from the latest IAB snapshot.
4. Run
``` bash
helm install www helm
```
to install the Helm chart.
5. Initiate a port-forwarding session for the pod that is running the `wagtail` service.
``` bash
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
```
e.g.
``` bash
kubectl --namespace default port-forward www-wagtail-69f957f5d6-ppfsd 8080:8000
```
6. Go to localhost:8080 on your web browser, and perform basic testing.
7. Create an admin user.
``` bash
kubectl exec -it $POD_NAME --container www -- python manage.py createsuperuser
```
e.g.
``` bash
kubectl exec -it www-wagtail-69f957f5d6-ppfsd --container www -- python manage.py createsuperuser
```
8. Using the admin username and password, log in to localhost:8080/admin.
23 changes: 0 additions & 23 deletions helm/.helmignore

This file was deleted.

20 changes: 0 additions & 20 deletions helm/Chart.yaml

This file was deleted.

79 changes: 0 additions & 79 deletions helm/local.py

This file was deleted.

Loading

0 comments on commit acc8b99

Please sign in to comment.