diff --git a/docs/developing.md b/docs/developing.md deleted file mode 100644 index 1d17758bb..000000000 --- a/docs/developing.md +++ /dev/null @@ -1,62 +0,0 @@ -Quickstart for developing Navigator -=================================== - -Setting up ----------- - -Install minikube and start a cluster with RBAC enabled: - - minikube start --extra-config=apiserver.Authorization.Mode=RBAC - -Work around `kube-dns` and helm having problems when RBAC is enabled in minikube: - - kubectl create clusterrolebinding cluster-admin:kube-system \ - --clusterrole=cluster-admin \ - --serviceaccount=kube-system:default - -Fetch the docker configuration: - - eval $(minikube docker-env) - -Build images in minikube's docker: - - make BUILD_TAG=dev all - -Or quicker (skips tests): - - make BUILD_TAG=dev build docker_build - -Install helm into the minikube cluster: - - helm init - -Install navigator using the helm chart: - - helm install contrib/charts/navigator \ - --set apiserver.image.pullPolicy=Never \ - --set apiserver.image.tag=dev \ - --set controller.image.pullPolicy=Never \ - --set controller.image.tag=dev \ - --name navigator --namespace navigator --wait - -Now test navigator is deployed by creating a demo elasticsearch cluster. Edit -`docs/quick-start/es-cluster-demo.yaml` to change the pilot image tag to `dev`, -and set the `pullPolicy` to `Never`, then create the cluster: - - kubectl create -f docs/quick-start/es-cluster-demo.yaml - - -Developing ----------- - -Edit code, then build: - - make BUILD_TAG=dev build docker_build - -Or only for the component you're interested in: - - make BUILD_TAG=dev controller docker_build_controller - -Kill the component you're working on, for example the controller: - - kubectl delete pods -n navigator -l app=navigator -l component=controller diff --git a/docs/quick-start/README.md b/docs/quick-start/README.md deleted file mode 100644 index 97f0a5631..000000000 --- a/docs/quick-start/README.md +++ /dev/null @@ -1,91 +0,0 @@ -# Quick-start Navigator - Elasticsearch - -Here we're going to deploy a distributed and scalable Elasticsearch cluster using the examples -provided in this repository. This will involve first deploying Navigator, and then creating -an `ElasticsearchCluster` resource. All management of the Elasticsearch cluster will be through -changes to the ElasticsearchCluster manifest. - -1) Install Navigator using [Helm](https://github.com/kubernetes/helm) - -```bash -$ helm install contrib/charts/navigator --name navigator --namespace navigator --wait -``` - -You should see the Navigator service start in the `navigator` namespace: - -```bash -$ kubectl get pod -n navigator -NAME READY STATUS RESTARTS AGE -navigator-745449320-dcgms 1/1 Running 0 30s -``` - -2) We can now create a new ElasticsearchCluster: - -```bash -$ kubectl create -f docs/quick-start/es-cluster-demo.yaml -``` - -This will deploy a multi-node Elasticsearch cluster, split into nodes of 3 roles: master, client (ingest) and data. -There will be 4 data nodes, each with a 10GB PV, 2 client nodes, and 3 master nodes. All of the options you may need -for configuring your cluster are documented on the [supported types page](../supported-types/). - -```bash -$ kubectl get pod -NAME READY STATUS RESTARTS AGE -es-demo-client-3995124321-5rc6g 1/1 Running 0 7m -es-demo-client-3995124321-9zrv9 1/1 Running 0 7m -es-demo-data-0 1/1 Running 0 7m -es-demo-data-1 1/1 Running 0 5m -es-demo-data-2 1/1 Running 0 3m -es-demo-data-3 1/1 Running 0 1m -es-demo-master-554549909-00162 1/1 Running 0 7m -es-demo-master-554549909-pp557 1/1 Running 0 7m -es-demo-master-554549909-vjgrt 1/1 Running 0 7m -``` - -3) Scale the data nodes: - -Scaling the nodes can be done by modifying your ElasticsearchCluster manifest. Currently this is only -possible using `kubectl replace`, due to bugs with the way ThirdPartyResource's are handled in kubectl 1.5. - -Edit your manifest & **increase** the number of replicas in the `data` node pool, then run: - -```bash -$ kubectl replace -f examples/es-cluster-example.yaml -$ kubectl get pod -NAME READY STATUS RESTARTS AGE -es-demo-client-3995124321-5rc6g 1/1 Running 0 9m -es-demo-client-3995124321-9zrv9 1/1 Running 0 9m -es-demo-data-0 1/1 Running 0 9m -es-demo-data-1 1/1 Running 0 7m -es-demo-data-2 1/1 Running 0 5m -es-demo-data-3 1/1 Running 0 3m -es-demo-data-4 0/1 Running 0 29s -es-demo-master-554549909-00162 1/1 Running 0 9m -es-demo-master-554549909-pp557 1/1 Running 0 9m -es-demo-master-554549909-vjgrt 1/1 Running 0 9m -``` - -You should see new data nodes being added into your cluster gradually. Once all are in the Running state, we can try -a scale down. Do the same as before, but instead reduce the number of replicas in the `data` node pool. Then run a -`kubectl replace` again: - -```bash -$ kubectl replace -f examples/es-cluster-example.yaml -$ kubectl get pod -NAME READY STATUS RESTARTS AGE -es-demo-client-3995124321-5rc6g 1/1 Running 0 10m -es-demo-client-3995124321-9zrv9 1/1 Running 0 10m -es-demo-data-0 1/1 Running 0 10m -es-demo-data-1 1/1 Running 0 8m -es-demo-data-2 1/1 Running 0 6m -es-demo-data-3 1/1 Running 0 4m -es-demo-data-4 1/1 Terminating 0 2m -es-demo-master-554549909-00162 1/1 Running 0 10m -es-demo-master-554549909-pp557 1/1 Running 0 10m -es-demo-master-554549909-vjgrt 1/1 Running 0 10m -``` - -Upon scale-down, the Elasticsearch nodes will mark themselves as non-allocatable. This will trigger Elasticsearch to -re-allocate any shards currently on the nodes being scaled down, meaning your data will be safely relocated within the -cluster. diff --git a/docs/quick-start/deployment-navigator.yaml b/docs/quick-start/deployment-navigator.yaml deleted file mode 100644 index 1f074824f..000000000 --- a/docs/quick-start/deployment-navigator.yaml +++ /dev/null @@ -1,84 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: navigator ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: navigator - namespace: navigator - labels: - app: navigator -spec: - replicas: 0 - strategy: - type: Recreate - template: - metadata: - labels: - app: navigator - spec: - containers: - - name: navigator - image: jetstackexperimental/navigator:latest - imagePullPolicy: IfNotPresent ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: navigator-apiserver - namespace: navigator - labels: - app: navigator - role: apiserver -spec: - replicas: 1 - selector: - matchLabels: - app: navigator - role: apiserver - template: - metadata: - labels: - app: navigator - role: apiserver - spec: - containers: - - name: navigator-server - image: quay.io/jetstack/navigator-apiserver:canary - imagePullPolicy: Always - args: - - "navigator-apiserver" - - "--etcd-servers=http://localhost:2379" - - --v=100 - - name: etcd - image: quay.io/coreos/etcd:v3.0.17 ---- -apiVersion: v1 -kind: Service -metadata: - name: navigator-apiserver - namespace: navigator -spec: - ports: - - port: 443 - protocol: TCP - targetPort: 443 - selector: - app: navigator - role: apiserver ---- -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - name: v1alpha1.navigator.jetstack.io -spec: - insecureSkipTLSVerify: true - group: navigator.jetstack.io - groupPriorityMinimum: 1000 - versionPriority: 15 - service: - name: navigator-apiserver - namespace: navigator - version: v1alpha1 diff --git a/docs/quick-start/storage-class.yaml b/docs/quick-start/storage-class.yaml deleted file mode 100644 index 690db8c95..000000000 --- a/docs/quick-start/storage-class.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: StorageClass -apiVersion: storage.k8s.io/v1 -metadata: - name: fast -provisioner: kubernetes.io/gce-pd -parameters: - type: pd-ssd diff --git a/sphinx-docs/Makefile b/docs/sphinx-docs/Makefile similarity index 100% rename from sphinx-docs/Makefile rename to docs/sphinx-docs/Makefile diff --git a/sphinx-docs/cassandra.rst b/docs/sphinx-docs/cassandra.rst similarity index 100% rename from sphinx-docs/cassandra.rst rename to docs/sphinx-docs/cassandra.rst diff --git a/sphinx-docs/conf.py b/docs/sphinx-docs/conf.py similarity index 100% rename from sphinx-docs/conf.py rename to docs/sphinx-docs/conf.py diff --git a/sphinx-docs/developing.rst b/docs/sphinx-docs/developing.rst similarity index 100% rename from sphinx-docs/developing.rst rename to docs/sphinx-docs/developing.rst diff --git a/sphinx-docs/elasticsearch.rst b/docs/sphinx-docs/elasticsearch.rst similarity index 100% rename from sphinx-docs/elasticsearch.rst rename to docs/sphinx-docs/elasticsearch.rst diff --git a/docs/arch.jpg b/docs/sphinx-docs/images/arch.jpg similarity index 100% rename from docs/arch.jpg rename to docs/sphinx-docs/images/arch.jpg diff --git a/sphinx-docs/images/demo.gif b/docs/sphinx-docs/images/demo.gif similarity index 100% rename from sphinx-docs/images/demo.gif rename to docs/sphinx-docs/images/demo.gif diff --git a/sphinx-docs/index.rst b/docs/sphinx-docs/index.rst similarity index 100% rename from sphinx-docs/index.rst rename to docs/sphinx-docs/index.rst diff --git a/sphinx-docs/quick-start.rst b/docs/sphinx-docs/quick-start.rst similarity index 100% rename from sphinx-docs/quick-start.rst rename to docs/sphinx-docs/quick-start.rst diff --git a/docs/quick-start/cassandra-cluster.yaml b/docs/sphinx-docs/quick-start/cassandra-cluster.yaml similarity index 100% rename from docs/quick-start/cassandra-cluster.yaml rename to docs/sphinx-docs/quick-start/cassandra-cluster.yaml diff --git a/docs/quick-start/es-cluster-demo.yaml b/docs/sphinx-docs/quick-start/es-cluster-demo.yaml similarity index 100% rename from docs/quick-start/es-cluster-demo.yaml rename to docs/sphinx-docs/quick-start/es-cluster-demo.yaml diff --git a/docs/supported-types/README.md b/docs/supported-types/README.md deleted file mode 100644 index fcd88858f..000000000 --- a/docs/supported-types/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Navigator - supported types - -* [ElasticsearchCluster](elasticsearch-cluster.md) - an Elasticsearch cluster definition diff --git a/docs/supported-types/cassandra-cluster.md b/docs/supported-types/cassandra-cluster.md deleted file mode 100644 index 60c748619..000000000 --- a/docs/supported-types/cassandra-cluster.md +++ /dev/null @@ -1,3 +0,0 @@ -# CassandraCluster - -See [cassandra-cluster.yaml](../quick-start/cassandra-cluster.yaml) diff --git a/docs/supported-types/elasticsearch-cluster.md b/docs/supported-types/elasticsearch-cluster.md deleted file mode 100644 index a0637950c..000000000 --- a/docs/supported-types/elasticsearch-cluster.md +++ /dev/null @@ -1,80 +0,0 @@ -# ElasticsearchCluster - -```yaml -apiVersion: navigator.jetstack.io/v1alpha1 -kind: ElasticsearchCluster -metadata: - name: demo -spec: - # this version number will be added as an annotation to each pod - version: '5.2.2' - # a list of additional plugins to install - plugins: - - name: "io.fabric8:elasticsearch-cloud-kubernetes:5.2.2" - - # custom sysctl's to set. These are set by privileged init containers. - sysctl: - - vm.max_map_count=262144 - - # pilot image to use - image: - repository: jetstackexperimental/pilot-elasticsearch - tag: master-907 - pullPolicy: Always - ## This sets the group of the persistent volume created for - ## the data nodes. This must be the same as the user that elasticsearch - ## runs as within the container. - fsGroup: 1000 - - # a list of nodepools that form the cluster - nodePools: - - name: data - replicas: 3 - - # nodes in a pool can be assigned roles, eg. 'data', 'client' and 'master' - roles: - - data - - resources: - requests: - cpu: '500m' - memory: 2Gi - limits: - cpu: '1' - memory: 3Gi - - # persistent sets persistent storage config - persistence: - # size of the volume - size: 10Gi - # storageClass of the volume - storageClass: "fast" - - - name: client - replicas: 2 - - roles: - - client - - resources: - requests: - cpu: '1' - memory: 2Gi - limits: - cpu: '2' - memory: 4Gi - - - name: master - replicas: 3 - - roles: - - master - - resources: - requests: - cpu: '1' - memory: 2Gi - limits: - cpu: '2' - memory: 4Gi -``` \ No newline at end of file diff --git a/sphinx-docs/images/arch.jpg b/sphinx-docs/images/arch.jpg deleted file mode 100644 index ce731c51b..000000000 Binary files a/sphinx-docs/images/arch.jpg and /dev/null differ diff --git a/sphinx-docs/quick-start/cassandra-cluster.yaml b/sphinx-docs/quick-start/cassandra-cluster.yaml deleted file mode 100644 index 0ab0ca8d5..000000000 --- a/sphinx-docs/quick-start/cassandra-cluster.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: "navigator.jetstack.io/v1alpha1" -kind: "CassandraCluster" -metadata: - name: "demo" -spec: - version: "3.11.1" - cqlPort: 9042 - sysctls: - - "vm.max_map_count=0" - nodePools: - - name: "ringnodes" - replicas: 3 - datacenter: "demo-datacenter" - rack: "demo-rack" - persistence: - enabled: true - size: "5Gi" - storageClass: "default" - nodeSelector: - image: - repository: "cassandra" - tag: "3" - pullPolicy: "IfNotPresent" - pilotImage: - repository: "jetstackexperimental/navigator-pilot-cassandra" - tag: "canary" diff --git a/sphinx-docs/quick-start/es-cluster-demo.yaml b/sphinx-docs/quick-start/es-cluster-demo.yaml deleted file mode 100644 index 2364080ae..000000000 --- a/sphinx-docs/quick-start/es-cluster-demo.yaml +++ /dev/null @@ -1,64 +0,0 @@ -apiVersion: navigator.jetstack.io/v1alpha1 -kind: ElasticsearchCluster -metadata: - name: demo -spec: - ## Omitting the minimumMasters fields will cause navigator to automatically - ## determine a quorum of masters to use. - # minimumMasters: 2 - version: 5.6.2 - - sysctls: - - vm.max_map_count=262144 - - securityContext: - runAsUser: 1000 - - pilotImage: - repository: jetstackexperimental/navigator-pilot-elasticsearch - tag: latest - pullPolicy: Always - - nodePools: - - name: master - replicas: 3 - - roles: - - master - - resources: - requests: - cpu: '500m' - memory: 2Gi - limits: - cpu: '1' - memory: 3Gi - - persistence: - enabled: true - # size of the volume - size: 10Gi - # storageClass of the volume - storageClass: standard - - - name: mixed - replicas: 2 - - roles: - - data - - ingest - - resources: - requests: - cpu: '500m' - memory: 2Gi - limits: - cpu: '1' - memory: 3Gi - - persistence: - enabled: true - # size of the volume - size: 10Gi - # storageClass of the volume - storageClass: standard