Skip to content

Commit

Permalink
Added initial deployment instructions. (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Emmanuel Mathot <[email protected]>
  • Loading branch information
pantierra and emmanuelmathot authored Oct 16, 2024
1 parent 8365e2e commit 55f5fae
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
helm/Chart.lock
.DS_STORE
.DS_Store
.DS_Store
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# polder
Web AOI viewer

## Installation

This application needs a kubernetes cluster. Once you have one set up you can `helm install` with the following steps:

0. `eoapi-k8s` depends on the [Crunchydata Postgresql Operator](https://access.crunchydata.com/documentation/postgres-operator/latest/installation/helm). Install that first:

```bash
helm install --set disable_check_for_upgrades=true pgo oci://registry.developers.crunchydata.com/crunchydata/pgo --version 5.5.2
```

1. Add the eoapi repo from https://devseed.com/eoapi-k8s/:

```bash
helm repo add eoapi https://devseed.com/eoapi-k8s/
```

2. Include dependencies

```bash
helm dependency build
```

2. Then go to the `helm` directory and do `helm install`

```bash
cd helm && helm install -n polder --create-namespace polder .
```
21 changes: 21 additions & 0 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v2
name: polder
description: Create a polder - Web AOI viewer - instance.
type: application
kubeVersion: ">=1.23.0-0"

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: "0.0.1"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.1"

dependencies:
- name: eoapi
version: 0.4.17
repository: "https://devseed.com/eoapi-k8s/"
Binary file added helm/charts/eoapi-0.4.17.tgz
Binary file not shown.
39 changes: 39 additions & 0 deletions helm/templates/Webapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.service.name }}
labels:
app: {{ .Values.service.name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.service.name }}
template:
metadata:
labels:
app: {{ .Values.service.name }}
spec:
containers:
- name: nginx
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
ports:
- containerPort: 80
resources:
{{- toYaml .Values.resources | nindent 12 }}

---

apiVersion: v1
kind: Service
metadata:
name: {{ .Values.service.name }}
labels:
app: {{ .Values.service.name }}
spec:
type: {{ .Values.service.type }}
ports:
- port: 8081
targetPort: 80
selector:
app: {{ .Values.service.name }}
19 changes: 19 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
replicaCount: 1

image:
repository: nginx
pullPolicy: IfNotPresent
tag: "1.27.2"

service:
enabled: true
name: polder-webapp
type: NodePort
ports:
- port: 8081
targetPort: 80
nodePort: 30001
selector:
app: polder-webapp

resources: {}

0 comments on commit 55f5fae

Please sign in to comment.