Skip to content

Instantly share code, notes, and snippets.

@vfarcic
Created April 14, 2021 23:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vfarcic/f026e806b76a483b3bd1edabc3a6e2fe to your computer and use it in GitHub Desktop.
Save vfarcic/f026e806b76a483b3bd1edabc3a6e2fe to your computer and use it in GitHub Desktop.
######################################################
# Shipa #
# A Kubernetes platform from developer's perspective #
# https://youtu.be/aCwlI3AhNOY #
######################################################
#########
# Setup #
#########
# Create a Kubernetes cluster in a single zone (regional clusters are supported only in the paid version)
curl -s https://storage.googleapis.com/shipa-client/install.sh \
| bash
git clone https://github.com/vfarcic/shipa-demo.git
cd shipa-demo
# We could use Shipa Cloud (https://apps.shipa.cloud) instead of installing Shipa inside the cluster
# Replace `[...]` with your email
export SHIPA_EMAIL=[...]
export SHIPA_PASS=IWillNeverTell
echo "
auth:
adminUser: $SHIPA_EMAIL
adminPassword: $SHIPA_PASS" \
| tee secret-values.yaml
helm repo add shipa \
https://shipa-charts.storage.googleapis.com
helm repo update
helm upgrade --install \
shipa shipa/shipa \
--namespace shipa-system \
--create-namespace \
--values secret-values.yaml \
--timeout=1000s \
--wait
export SHIPA_HOST=$(kubectl --namespace=shipa-system get svc shipa-ingress-nginx -o jsonpath="{.status.loadBalancer.ingress[0].ip}") && if [[ -z $SHIPA_HOST ]]; then export SHIPA_HOST=$(kubectl --namespace=shipa-system get svc shipa-ingress-nginx -o jsonpath="{.status.loadBalancer.ingress[0].hostname}") ; fi
shipa target add shipa $SHIPA_HOST \
--set-current
echo "http://$(kubectl --namespace shipa-system \
get ingress app-dashboard-http \
--output jsonpath='{.spec.rules[0].host}')"
# Open it
# Follow the instructions
shipa login
########################################
# Deploying apps from container images #
########################################
shipa platform list
shipa app create \
devops-toolkit static \
--team shipa-admin-team
shipa app deploy \
--app devops-toolkit \
--image vfarcic/devops-toolkit-series
shipa app list
# Open the link
shipa app deploy list \
--app devops-toolkit
####################
# Adding platforms #
####################
shipa platform add --help
# Open https://learn.shipa.io/docs/platforms-1
ls -1
shipa platform add go
shipa platform list
###################################
# Deploying apps from source code #
###################################
shipa app create shipa-demo go \
--team shipa-admin-team
shipa app deploy \
--app shipa-demo \
--files-only .
##########################
# Deploying new releases #
##########################
# Modify main.go
shipa app deploy \
--app shipa-demo \
--files-only .
shipa app list
shipa app deploy list --app shipa-demo
########################
# Scaling applications #
########################
shipa unit add 2 --app shipa-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment