- When the leader gets a new configuration, it assigns a monotonically increasing version number to it and stores it in a k8s annotation (similar to how the leader election algorithm uses annotations). The version # will be for router-internal use only.
- When the leader gets a new configuration, it increments the version, stores it in the annotation, then sends the version along with the new configuration to all other router replicas. Each replica only responds when it has finished updating both its config and version number. If any replica doesn't respond within a reasonable timeout, the leader terminates it.
- When a non-leader comes online with a version #, it compares its local known value with that in the annotation. If they don't match, it requests the most up to date version number and config from the leader
- When a non-leader comes online with no version, it requests the most up to date version and config from the leader.
- If a non-leader gets one or more configurat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: claim-1 | |
namespace: default | |
labels: | |
type: service-plan-claim | |
data: | |
service-id: "helm-alpine" | |
plan-id: "standard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"sync" | |
"time" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENG000656:workflow-manager-api aaronschlesinger$ kd logs -f deis-database-sr5al | |
The files belonging to this database system will be owned by user "postgres". | |
This user must also own the server process. | |
The database cluster will be initialized with locale "en_US.utf8". | |
The default database encoding has accordingly been set to "UTF8". | |
The default text search configuration will be set to "english". | |
Data page checksums are disabled. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func WithAuth(tokenToCheck, tokenHeaderName string, next http.Handler) http.Handler { | |
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | |
if r.Header.Get(tokenHeaderName) != tokenToCheck { | |
http.Error(w, "not authorized", http.StatusUnauthorized) | |
return | |
} | |
next.ServeHTTP(w, r) | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENG000656:workflow-e2e aaronschlesinger$ kd logs -f deis-controller-rbexd | |
system information: | |
Django Version: 1.9.3 | |
Python 3.5.1 | |
Django checks: | |
System check identified no issues (2 silenced). | |
Health Checks: | |
Checking if database is alive | |
Database is alive! | |
Database Migrations: |
We're going to overview the entire process of installing a new Deis cluster on an existing Kubernetes cluster, creating and configuring your app, deploying code, and scaling up.
- A working Kubernetes cluster on Google Container Engine (Deis, of course, works anywhere Kubernetes can be installed, but the installation instructions in step 1 are tailored to GKE)
- The Kubernetes client CLI (
kubectl
) installed on thePATH
, and configured to talk to the aforementioned cluster - An alias called
kd
tokubectl --namespace=deis
(alias kd="kubectl --namespace=deis"
will create it in most shells). This alias will be useful since the Helm Deis chart installs all of the components into thedeis
namespace - The Helm CLI installed on the
PATH
. Helm is our open source Kubernetes package manager. Find it at https://github.com/helm/helm - Ensure you have no installed Helm repository called
deis
(helm repo remove deis
if you do) - Ensure no `d
Name | Cloud? | Local? | Level of Configurability | Ease of setup |
---|---|---|---|---|
kube-up.sh on 1.1 | Yes | Yes | High | Medium |
micro-kube | No (technically, I think you can with some extra work, since Vagrant supports spinning up cloud VMs. Instructions not in the micro-kube README though) | Yes | Low | High |
GKE | Yes | No | Low | High |
Digital Ocean using Terraform | Yes | No | Medium | Easy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker ps -a | grep Exited | cut -d ' ' -f 1 | xargs docker rm |
I think we should have all our code in a monolithic repository.
I've detailed the big benefits to having one, addressed possible issues to having one, and mentioned a few risks to not moving to a monorepo below.
Golang package dependencies
- Single
vendor/
dir at the top level ofdeis/deis
- All internal packages use the same external dependencies