2017-07-21 23:43:45 +00:00
|
|
|
= Hacking Code Valet
|
|
|
|
|
|
|
|
|
|
|
|
== Architecture
|
|
|
|
|
|
|
|
WARNING: This is most definitely not set in stone
|
|
|
|
|
|
|
|
|
|
|
|
=== Control Plane
|
|
|
|
|
|
|
|
|
|
|
|
A Kubernetes cluster which will act as the control plane
|
|
|
|
|
|
|
|
|
|
|
|
=== Management
|
|
|
|
|
|
|
|
A webapp which acts as the primary controller, user interface for non-Jenkins
|
|
|
|
specific tasks:
|
|
|
|
|
|
|
|
. Surfacing *publicly readable* logs from the Jenkins masters
|
|
|
|
.. Searchable logs for exceptions, etc
|
|
|
|
.. Roll-ups of common exceptions by plugin, etc
|
|
|
|
. Listing statistics from the other running Jenkins masters
|
|
|
|
.. Number of Pipelines active
|
|
|
|
|
|
|
|
=== Jenkins
|
|
|
|
|
|
|
|
Each GitHub user will have a per-user allocated Jenkins master which executes
|
|
|
|
as a container in this control plane. For example: `rtyler.codevalet.io` would
|
|
|
|
contain all the Pipelines which can be found inside of
|
|
|
|
`https://github.com/rtyler`
|
|
|
|
|
|
|
|
To start, new Jenkins masters will be configured manual (beta testing!) and
|
|
|
|
users will have access primarily through to
|
|
|
|
link:https://jenkins.io/projects/blueocean[Blue Ocean], but will **not** be
|
|
|
|
given administrative access to the Jenkins master.
|
|
|
|
|
|
|
|
|
|
|
|
Groovy scripting will set up some VM templates which will provide dynamically
|
|
|
|
provisioned agents in a cloud provider such as Azure, with a fixed quota, i.e.
|
|
|
|
2 active machines per.
|
2017-11-30 01:34:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
== Operating
|
|
|
|
|
|
|
|
Presently, after moving into a CloudBees-owned Azure subscription, instances
|
|
|
|
come up with scoped (`Contributor`) permissions to provision resources only
|
|
|
|
within the `azureagents-for-codevalet` resource group.
|
2017-12-03 18:26:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
== Provisioning Kubernetes
|
|
|
|
|
|
|
|
* Provisioning the AKS cluster to begin with: `az aks create -g codevalet -n codevalet -s Standard_DS4_v2 -l eastus -k 1.8.1`
|
|
|
|
* Add the ingress-nginx controller based on link:https://github.com/kubernetes/ingress-nginx/tree/master/deploy[these instructures]
|
|
|
|
* Edit the storage classes to make the `managed-premium` storage class default,
|
|
|
|
`kubectl edit storageclass managed-premium` and add the
|
|
|
|
`storageclass.kubernetes.io/is-default-class` annotation with a value of
|
|
|
|
`'true'`
|
|
|
|
* Start applying yamls in order
|