Goal: Install Consul 1.17.0
.
# INSTALL
# Source: https://developer.hashicorp.com/consul/downloads
wget -O- https://apt.releases.hashicorp.com/gpg \
| sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
mkdir ./{vault,dgraph} | |
cat << 'EOF' > compose.yml | |
services: | |
zero1: | |
image: dgraph/dgraph:${DGRAPH_VERSION} | |
command: dgraph zero --my=zero1:5080 --replicas 1 --raft idx=1 | |
ports: | |
- 6080:6080 | |
container_name: zero1 |
EKS_CLUSTER_NAME=${EKS_CLUSTER_NAME:-"my-cluster"} | |
NODE_GROUP=$(aws eks list-nodegroups \ | |
--cluster-name $EKS_CLUSTER_NAME \ | |
| jq -r '.nodegroups[0]' | |
) | |
ROLE_ARN=$(aws eks describe-nodegroup \ | |
--cluster-name $EKS_CLUSTER_NAME \ | |
--nodegroup-name $NODE_GROUP \ | |
| jq -r '.nodegroup.nodeRole' | |
) |
Pedantic ADHD Guide to Kubenretes Provisioning
This is my guide for how to get Kubernetes provisioned using Azure, Google Cloud, or AWS using CLI tools. This will require setting up an account with local CLI tools. The goal of this is to quickly set up a disposable test clusters in minimalist way.
Some tools used here:
direnv
) - used to setup environment variables automaticallyDDL is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database.
DML is short name of Data Manipulation Language which deals with data manipulation, and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE etc, and it is used to store, modify, retrieve, delete and update data in database.
DCL is short name of Data Control Language which includes commands such as GRANT, and mostly concerned with rights, permissions and other controls of the database system.
Text types
# enable billing and APIs for GKE project if not done already | |
gcloud projects create $GKE_PROJECT_ID | |
gcloud config set project $GKE_PROJECT_ID | |
gcloud beta billing projects link $GKE_PROJECT_ID \ | |
--billing-account $ClOUD_BILLING_ACCOUNT | |
gcloud services enable "container.googleapis.com" |
# gke | |
export GKE_PROJECT_ID="my-gke-project" # CHANGE ME | |
export GKE_CLUSTER_NAME="csm-demo" | |
export GKE_REGION="us-central1" | |
export GKE_SA_NAME="gke-worker-nodes-sa" | |
export GKE_SA_EMAIL="$GKE_SA_NAME@${GKE_PROJECT_ID}.iam.gserviceaccount.com" | |
export KUBECONFIG=~/.kube/$GKE_REGION-$GKE_CLUSTER_NAME.yaml | |
# other | |
export USE_GKE_GCLOUD_AUTH_PLUGIN=True |
{ | |
me(func:allofterms(name, "Star Wars")) @filter(ge(release_date, "1980")) { | |
name | |
release_date | |
revenue | |
running_time | |
director { | |
name | |
} | |
starring { |
source env.sh | |
gcloud container clusters delete $GKE_CLUSTER_NAME \ | |
--project $GKE_PROJECT_ID --region $GKE_REGION | |
gcloud iam service-accounts delete $GKE_SA_EMAIL --project $GKE_PROJECT_ID |
source env.sh | |
# delete pydgraph-client | |
helmfile --file ./examples/dgraph/helmfile.yaml delete | |
kubectl delete namespace pydgraph-client | |
# delete dgraph | |
helmfile --file ./examples/dgraph/helmfile.yaml delete | |
kubectl delete pvc --selector app=dgraph --namespace "dgraph" | |
kubectl delete namespace dgraph |