Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taskfile for creating local setup #115

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CLUSTER_NAME=amplus
CKAN_PORT=8888
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
charts/*
.env
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,25 @@ $ kubectl delete pvc -l release=$release
[1]: https://opensource.org/licenses/Apache-2.0
[Chat on Gitter]: https://badges.gitter.im/gitterHQ/gitter.svg
[2]: https://gitter.im/keitaroinc/docker-ckan

## Running on local K8S cluster
Prerequisites:
```
taskfile
kind
kubectl
kubectx
kubens
```
For setting up the cluster and installing ckan and dependencies in helm
```
task setup-ckan
```
For destroying the setup run
```
task destroy
```
For only setting up the kubernetes cluster and the namespaces
```
task setup
```
29 changes: 29 additions & 0 deletions taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "3"

dotenv: [".env"]

tasks:
setup:
name: Setting up project
desc: "Setting up cluster and resources"
cmds:
- kind create cluster --name $CLUSTER_NAME
- kubectl create ns ckan-test
- kubens ckan-test
status:
- kind get clusters | grep amplus
- kubectl get ns ckan-test

setup-ckan:
name: Setuo cluster and ckan
deps: ["setup"]
cmds:
- helm upgrade --install ckan .
- kubectl wait --for=condition=Available=True deployment/ckan --timeout=300s
- kubectl port-forward svc/ckan $CKAN_PORT:80

destroy:
name: Delete project setup
desc: "Delete k8s cluster"
cmds:
- kind delete cluster --name $CLUSTER_NAME
2 changes: 1 addition & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
repository: keitaro/ckan
tag: 2.10.3
tag: 2.10.4
pullPolicy: IfNotPresent
testConnection:
repository: busybox
Expand Down
Loading