diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 13e997a..3bbded3 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -114,3 +114,30 @@ Non-OpenStack Deployment (aka Spot mode) To run scenarios against remote nodes (``shaker-spot`` command) install shaker on the local host. Make sure all necessary system tools are installed too. See :ref:`spot_scenarios` for more details. + + +Run Shaker against OpenStack deployed by Fuel-CCP on Kubernetes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Shaker can be run in Kubernetes environment and can execute scenarios against +OpenStack deployed by Fuel-CCP tool. + +Shaker app consists of *service*: + + .. literalinclude:: k8s/shaker-svc.yaml + :language: yaml + +and *pod*: + + .. literalinclude:: k8s/shaker-pod.yaml + :language: yaml + +You may need to change values for variables defined in config files: + + * `SHAKER_SERVER_ENDPOINT` should point to external address of Kubernetes cluster, + and OpenStack instances must have access to it + * `OS_***` parameters describe connection to Keystone endpoint + * `SHAKER_SCENARIO` needs to be altered to run the needed scenario + * Pod is configured to write logs into /tmp on the node that hosts the pod + * `port`, `nodePort` and `targetPort` must be equal and not to conflict with + other exposed services diff --git a/doc/source/k8s/shaker-pod.yaml b/doc/source/k8s/shaker-pod.yaml new file mode 100644 index 0000000..09154cb --- /dev/null +++ b/doc/source/k8s/shaker-pod.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: Pod +metadata: + name: shaker + labels: + app: shaker +spec: + containers: + - args: + - --debug + - --nocleanup + env: + - name: OS_USERNAME + value: admin + - name: OS_PASSWORD + value: password + - name: OS_PROJECT_NAME + value: admin + - name: OS_AUTH_URL + value: http://keystone.ccp:5000/ + - name: SHAKER_SCENARIO + value: openstack/perf_l2 + - name: SHAKER_SERVER_ENDPOINT + value: 172.20.9.7:31999 + image: shakhat/shaker + imagePullPolicy: Always + name: shaker + securityContext: + privileged: false + volumeMounts: + - mountPath: /artifacts + name: artifacts + dnsPolicy: ClusterFirst + restartPolicy: Never + volumes: + - name: artifacts + hostPath: + path: /tmp diff --git a/doc/source/k8s/shaker-svc.yaml b/doc/source/k8s/shaker-svc.yaml new file mode 100644 index 0000000..e7d0a62 --- /dev/null +++ b/doc/source/k8s/shaker-svc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: shaker +spec: + ports: + - nodePort: 31999 + port: 31999 + protocol: TCP + targetPort: 31999 + selector: + app: shaker + type: NodePort