Add create/delete of clover-system services from CLI 09/64409/5
authorearrage <eddie.arrage@huawei.com>
Fri, 2 Nov 2018 04:04:15 +0000 (21:04 -0700)
committerearrage <eddie.arrage@huawei.com>
Wed, 7 Nov 2018 06:08:18 +0000 (22:08 -0800)
commitc2d93ffefcd337c8125d3efb289dd488c9cbbaae
tree81d3127dad53f561962244fa465865c70fb250dc
parent9bdb6dc9353992219721acba6b9c4576dbb38ece
Add create/delete of clover-system services from CLI

- Improve usability when deploying or deleting various
Clover components using cloverctl
- Add yaml for each of the clover-system services
including controller, collector, spark, redis, cassandra,
clovisor and jmeter separated by k8s resource and available
under a single yaml directory
- Deploy/delete yaml for services in various subsets including:
  - visibility(controller, collector, spark, redis, cassandra)
  - datastore(redis, cassandra)
  - validation(jmeter master/slaves(4))
  - clovisor (individually)
  - collector (individually)
  - controller (individually)
Ex.  cloverctl create system controller
Ex.  cloverctl create system visibility
- Ability to add nodeport for controller separately
(cloverctl create system controller nodeport)
- Use native client-go methods to create/delete all k8s resources
used by Clover including:
  - pods, deployments, statefulsets, daemonsets, services
  - serviceaccounts, clusterrolebindings
- Above allows yaml override of values such as image value specified
in deployment or daemonset. This is broken down by:
- tag (ex. latest, opnfv-7.0.0) or repo'(ex. opnfv, localhost:5000)
that can be added with CLI flags as shown below:
(cloverctl create system visibility -t latest -r localhost:5000)
  - defaults to -r opnfv -t latest
- Creates/deletes clover-system namespace

- Also added ability to create/delete lb service for controller
external access when running on environment such as GKE
(cloverctl <create/delete> system controller lb)

Change-Id: I2a3c6c80035d4663fa38368b3ff13e9a14090a47
Signed-off-by: earrage <eddie.arrage@huawei.com>
26 files changed:
clover/cloverctl/src/cloverctl/cmd/create_system.go
clover/cloverctl/src/cloverctl/cmd/delete_system.go
clover/cloverctl/src/cloverctl/cmd/set.go [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/clovisor/clusterrolebinding.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/clovisor/daemonset.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/clovisor/serviceaccount.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/collector/deployment.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/collector/service.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/controller/deployment.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/controller/service_internal.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/controller/service_lb.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/controller/service_nodeport.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/datastore/cassandra_service.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/datastore/cassandra_statefulset.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/datastore/redis_pod.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/datastore/redis_service.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/jmeter/master_deployment.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/jmeter/master_service.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/jmeter/slave_deployment.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/jmeter/slave_service.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/spark/clusterrolebinding.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/spark/clusterrolebinding_spark.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/spark/deployment.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverctl/yaml/spark/serviceaccount.yaml [new file with mode: 0644]
clover/cloverctl/src/cloverkube/main.go
clover/tools/jmeter/yaml/manifest.template