summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/doc
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lib_openshift/src/doc')
-rw-r--r--roles/lib_openshift/src/doc/atomic_container36
-rw-r--r--roles/lib_openshift/src/doc/ca_server_cert96
-rw-r--r--roles/lib_openshift/src/doc/registry192
-rw-r--r--roles/lib_openshift/src/doc/router217
-rw-r--r--roles/lib_openshift/src/doc/sdnvalidator27
5 files changed, 568 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/doc/atomic_container b/roles/lib_openshift/src/doc/atomic_container
new file mode 100644
index 000000000..53fc40f36
--- /dev/null
+++ b/roles/lib_openshift/src/doc/atomic_container
@@ -0,0 +1,36 @@
+# flake8: noqa
+# pylint: skip-file
+
+DOCUMENTATION = '''
+---
+module: oc_atomic_container
+short_description: Manage the container images on the atomic host platform
+description:
+ - Manage the container images on the atomic host platform
+ - Allows to execute the commands on the container images
+requirements:
+ - atomic
+ - "python >= 2.6"
+options:
+ name:
+ description:
+ - Name of the container
+ required: True
+ default: null
+ image:
+ description:
+ - The image to use to install the container
+ required: True
+ default: null
+ state:
+ description:
+ - State of the container
+ required: True
+ choices: ["latest", "absent", "latest", "rollback"]
+ default: "latest"
+ values:
+ description:
+ - Values for the installation of the container
+ required: False
+ default: None
+'''
diff --git a/roles/lib_openshift/src/doc/ca_server_cert b/roles/lib_openshift/src/doc/ca_server_cert
new file mode 100644
index 000000000..ff9229281
--- /dev/null
+++ b/roles/lib_openshift/src/doc/ca_server_cert
@@ -0,0 +1,96 @@
+# flake8: noqa
+# pylint: skip-file
+
+DOCUMENTATION = '''
+---
+module: oc_adm_ca_server_cert
+short_description: Module to run openshift oc adm ca create-server-cert
+description:
+ - Wrapper around the openshift `oc adm ca create-server-cert` command.
+options:
+ state:
+ description:
+ - Present is the only supported state. The state present means that `oc adm ca` will generate a certificate
+ - and verify if the hostnames and the ClusterIP exists in the certificate.
+ - When create-server-cert is desired then the following parameters are passed.
+ - ['cert', 'key', 'signer_cert', 'signer_key', 'signer_serial']
+ required: false
+ default: present
+ choices:
+ - present
+ aliases: []
+ kubeconfig:
+ description:
+ - The path for the kubeconfig file to use for authentication
+ required: false
+ default: /etc/origin/master/admin.kubeconfig
+ aliases: []
+ debug:
+ description:
+ - Turn on debug output.
+ required: false
+ default: False
+ aliases: []
+ cert:
+ description:
+ - The certificate file. Choose a name that indicates what the service is.
+ required: false
+ default: None
+ aliases: []
+ key:
+ description:
+ - The key file. Choose a name that indicates what the service is.
+ required: false
+ default: None
+ aliases: []
+ force:
+ description:
+ - Force updating of the existing cert and key files
+ required: false
+ default: False
+ aliases: []
+ signer_cert:
+ description:
+ - The signer certificate file.
+ required: false
+ default: /etc/origin/master/ca.crt
+ aliases: []
+ signer_key:
+ description:
+ - The signer key file.
+ required: false
+ default: /etc/origin/master/ca.key
+ aliases: []
+ signer_serial:
+ description:
+ - The signer serial file.
+ required: false
+ default: /etc/origin/master/ca.serial.txt
+ aliases: []
+ hostnames:
+ description:
+ - Every hostname or IP that server certs should be valid for
+ required: false
+ default: []
+ aliases: []
+ backup:
+ description:
+ - Whether to backup the cert and key files before writing them.
+ required: false
+ default: True
+ aliases: []
+author:
+- "Kenny Woodson <kwoodson@redhat.com>"
+extends_documentation_fragment: []
+'''
+
+EXAMPLES = '''
+- name: Create a self-signed cert
+ oc_adm_ca_server_cert:
+ signer_cert: /etc/origin/master/ca.crt
+ signer_key: /etc/origin/master/ca.key
+ signer_serial: /etc/origin/master/ca.serial.txt
+ hostnames: "registry.test.openshift.com,127.0.0.1,docker-registry.default.svc.cluster.local"
+ cert: /etc/origin/master/registry.crt
+ key: /etc/origin/master/registry.key
+'''
diff --git a/roles/lib_openshift/src/doc/registry b/roles/lib_openshift/src/doc/registry
new file mode 100644
index 000000000..ebc714b7a
--- /dev/null
+++ b/roles/lib_openshift/src/doc/registry
@@ -0,0 +1,192 @@
+# flake8: noqa
+# pylint: skip-file
+
+DOCUMENTATION = '''
+---
+module: oc_adm_registry
+short_description: Module to manage openshift registry
+description:
+ - Manage openshift registry programmatically.
+options:
+ state:
+ description:
+ - The desired action when managing openshift registry
+ - present - update or create the registry
+ - absent - tear down the registry service and deploymentconfig
+ - list - returns the current representiation of a registry
+ required: false
+ default: False
+ aliases: []
+ kubeconfig:
+ description:
+ - The path for the kubeconfig file to use for authentication
+ required: false
+ default: /etc/origin/master/admin.kubeconfig
+ aliases: []
+ debug:
+ description:
+ - Turn on debug output.
+ required: false
+ default: False
+ aliases: []
+ name:
+ description:
+ - The name of the registry
+ required: false
+ default: None
+ aliases: []
+ namespace:
+ description:
+ - The selector when filtering on node labels
+ required: false
+ default: None
+ aliases: []
+ images:
+ description:
+ - The image to base this registry on - ${component} will be replaced with --type
+ required: 'openshift3/ose-${component}:${version}'
+ default: None
+ aliases: []
+ latest_images:
+ description:
+ - If true, attempt to use the latest image for the registry instead of the latest release.
+ required: false
+ default: False
+ aliases: []
+ labels:
+ description:
+ - A set of labels to uniquely identify the registry and its components.
+ required: false
+ default: None
+ aliases: []
+ enforce_quota:
+ description:
+ - If set, the registry will refuse to write blobs if they exceed quota limits
+ required: False
+ default: False
+ aliases: []
+ mount_host:
+ description:
+ - If set, the registry volume will be created as a host-mount at this path.
+ required: False
+ default: False
+ aliases: []
+ ports:
+ description:
+ - A comma delimited list of ports or port pairs to expose on the registry pod. The default is set for 5000.
+ required: False
+ default: [5000]
+ aliases: []
+ replicas:
+ description:
+ - The replication factor of the registry; commonly 2 when high availability is desired.
+ required: False
+ default: 1
+ aliases: []
+ selector:
+ description:
+ - Selector used to filter nodes on deployment. Used to run registries on a specific set of nodes.
+ required: False
+ default: None
+ aliases: []
+ service_account:
+ description:
+ - Name of the service account to use to run the registry pod.
+ required: False
+ default: 'registry'
+ aliases: []
+ tls_certificate:
+ description:
+ - An optional path to a PEM encoded certificate (which may contain the private key) for serving over TLS
+ required: false
+ default: None
+ aliases: []
+ tls_key:
+ description:
+ - An optional path to a PEM encoded private key for serving over TLS
+ required: false
+ default: None
+ aliases: []
+ volume_mounts:
+ description:
+ - The volume mounts for the registry.
+ required: false
+ default: None
+ aliases: []
+ daemonset:
+ description:
+ - Use a daemonset instead of a deployment config.
+ required: false
+ default: False
+ aliases: []
+ edits:
+ description:
+ - A list of modifications to make on the deploymentconfig
+ required: false
+ default: None
+ aliases: []
+ env_vars:
+ description:
+ - A dictionary of modifications to make on the deploymentconfig. e.g. FOO: BAR
+ required: false
+ default: None
+ aliases: []
+ force:
+ description:
+ - Force a registry update.
+ required: false
+ default: False
+ aliases: []
+author:
+- "Kenny Woodson <kwoodson@redhat.com>"
+extends_documentation_fragment: []
+'''
+
+EXAMPLES = '''
+- name: create a secure registry
+ oc_adm_registry:
+ name: docker-registry
+ service_account: registry
+ replicas: 2
+ namespace: default
+ selector: type=infra
+ images: "registry.ops.openshift.com/openshift3/ose-${component}:${version}"
+ env_vars:
+ REGISTRY_CONFIGURATION_PATH: /etc/registryconfig/config.yml
+ REGISTRY_HTTP_TLS_CERTIFICATE: /etc/secrets/registry.crt
+ REGISTRY_HTTP_TLS_KEY: /etc/secrets/registry.key
+ REGISTRY_HTTP_SECRET: supersecret
+ volume_mounts:
+ - path: /etc/secrets
+ name: dockercerts
+ type: secret
+ secret_name: registry-secret
+ - path: /etc/registryconfig
+ name: dockersecrets
+ type: secret
+ secret_name: docker-registry-config
+ edits:
+ - key: spec.template.spec.containers[0].livenessProbe.httpGet.scheme
+ value: HTTPS
+ action: put
+ - key: spec.template.spec.containers[0].readinessProbe.httpGet.scheme
+ value: HTTPS
+ action: put
+ - key: spec.strategy.rollingParams
+ value:
+ intervalSeconds: 1
+ maxSurge: 50%
+ maxUnavailable: 50%
+ timeoutSeconds: 600
+ updatePeriodSeconds: 1
+ action: put
+ - key: spec.template.spec.containers[0].resources.limits.memory
+ value: 2G
+ action: update
+ - key: spec.template.spec.containers[0].resources.requests.memory
+ value: 1G
+ action: update
+
+ register: registryout
+
+'''
diff --git a/roles/lib_openshift/src/doc/router b/roles/lib_openshift/src/doc/router
new file mode 100644
index 000000000..ed46e03a0
--- /dev/null
+++ b/roles/lib_openshift/src/doc/router
@@ -0,0 +1,217 @@
+# flake8: noqa
+# pylint: skip-file
+
+DOCUMENTATION = '''
+---
+module: oc_adm_router
+short_description: Module to manage openshift router
+description:
+ - Manage openshift router programmatically.
+options:
+ state:
+ description:
+ - Whether to create or delete the router
+ - present - create the router
+ - absent - remove the router
+ - list - return the current representation of a router
+ required: false
+ default: present
+ choices:
+ - present
+ - absent
+ aliases: []
+ kubeconfig:
+ description:
+ - The path for the kubeconfig file to use for authentication
+ required: false
+ default: /etc/origin/master/admin.kubeconfig
+ aliases: []
+ debug:
+ description:
+ - Turn on debug output.
+ required: false
+ default: False
+ aliases: []
+ name:
+ description:
+ - The name of the router
+ required: false
+ default: router
+ aliases: []
+ namespace:
+ description:
+ - The namespace where to manage the router.
+ required: false
+ default: default
+ aliases: []
+ images:
+ description:
+ - The image to base this router on - ${component} will be replaced with --type
+ required: 'openshift3/ose-${component}:${version}'
+ default: None
+ aliases: []
+ latest_images:
+ description:
+ - If true, attempt to use the latest image for the registry instead of the latest release.
+ required: false
+ default: False
+ aliases: []
+ labels:
+ description:
+ - A set of labels to uniquely identify the registry and its components.
+ required: false
+ default: None
+ aliases: []
+ ports:
+ description:
+ - A list of strings in the 'port:port' format
+ required: False
+ default:
+ - 80:80
+ - 443:443
+ aliases: []
+ replicas:
+ description:
+ - The replication factor of the registry; commonly 2 when high availability is desired.
+ required: False
+ default: 1
+ aliases: []
+ selector:
+ description:
+ - Selector used to filter nodes on deployment. Used to run routers on a specific set of nodes.
+ required: False
+ default: None
+ aliases: []
+ service_account:
+ description:
+ - Name of the service account to use to run the router pod.
+ required: False
+ default: router
+ aliases: []
+ router_type:
+ description:
+ - The router image to use - if you specify --images this flag may be ignored.
+ required: false
+ default: haproxy-router
+ aliases: []
+ external_host:
+ description:
+ - If the underlying router implementation connects with an external host, this is the external host's hostname.
+ required: false
+ default: None
+ aliases: []
+ external_host_vserver:
+ description:
+ - If the underlying router implementation uses virtual servers, this is the name of the virtual server for HTTP connections.
+ required: false
+ default: None
+ aliases: []
+ external_host_insecure:
+ description:
+ - If the underlying router implementation connects with an external host
+ - over a secure connection, this causes the router to skip strict certificate verification with the external host.
+ required: false
+ default: False
+ aliases: []
+ external_host_partition_path:
+ description:
+ - If the underlying router implementation uses partitions for control boundaries, this is the path to use for that partition.
+ required: false
+ default: None
+ aliases: []
+ external_host_username:
+ description:
+ - If the underlying router implementation connects with an external host, this is the username for authenticating with the external host.
+ required: false
+ default: None
+ aliases: []
+ external_host_password:
+ description:
+ - If the underlying router implementation connects with an external host, this is the password for authenticating with the external host.
+ required: false
+ default: None
+ aliases: []
+ external_host_private_key:
+ description:
+ - If the underlying router implementation requires an SSH private key, this is the path to the private key file.
+ required: false
+ default: None
+ aliases: []
+ expose_metrics:
+ description:
+ - This is a hint to run an extra container in the pod to expose metrics - the image
+ - will either be set depending on the router implementation or provided with --metrics-image.
+ required: false
+ default: False
+ aliases: []
+ metrics_image:
+ description:
+ - If expose_metrics is specified this is the image to use to run a sidecar container
+ - in the pod exposing metrics. If not set and --expose-metrics is true the image will
+ - depend on router implementation.
+ required: false
+ default: None
+ aliases: []
+author:
+- "Kenny Woodson <kwoodson@redhat.com>"
+extends_documentation_fragment:
+- There are some exceptions to note when doing the idempotency in this module.
+- The strategy is to use the oc adm router command to generate a default
+- configuration when creating or updating a router. Often times there
+- differences from the generated template and what is in memory in openshift.
+- We make exceptions to not check these specific values when comparing objects.
+- Here are a list of exceptions:
+- - DeploymentConfig:
+ - dnsPolicy
+ - terminationGracePeriodSeconds
+ - restartPolicy
+ - timeoutSeconds
+ - livenessProbe
+ - readinessProbe
+ - terminationMessagePath
+ - hostPort
+ - defaultMode
+ - Service:
+ - portalIP
+ - clusterIP
+ - sessionAffinity
+ - type
+ - ServiceAccount:
+ - secrets
+ - imagePullSecrets
+'''
+
+EXAMPLES = '''
+- name: create routers
+ oc_adm_router:
+ name: router
+ service_account: router
+ replicas: 2
+ namespace: default
+ selector: type=infra
+ cert_file: /etc/origin/master/named_certificates/router.crt
+ key_file: /etc/origin/master/named_certificates/router.key
+ cacert_file: /etc/origin/master/named_certificates/router.ca
+ edits:
+ - key: spec.strategy.rollingParams
+ value:
+ intervalSeconds: 1
+ maxSurge: 50%
+ maxUnavailable: 50%
+ timeoutSeconds: 600
+ updatePeriodSeconds: 1
+ action: put
+ - key: spec.template.spec.containers[0].resources.limits.memory
+ value: 2G
+ action: put
+ - key: spec.template.spec.containers[0].resources.requests.memory
+ value: 1G
+ action: put
+ - key: spec.template.spec.containers[0].env
+ value:
+ name: EXTENDED_VALIDATION
+ value: 'false'
+ action: update
+ register: router_out
+ run_once: True
+'''
diff --git a/roles/lib_openshift/src/doc/sdnvalidator b/roles/lib_openshift/src/doc/sdnvalidator
new file mode 100644
index 000000000..0b1862ed1
--- /dev/null
+++ b/roles/lib_openshift/src/doc/sdnvalidator
@@ -0,0 +1,27 @@
+# flake8: noqa
+# pylint: skip-file
+
+DOCUMENTATION = '''
+---
+module: oc_sdnvalidator
+short_description: Validate SDN objects
+description:
+ - Validate SDN objects
+options:
+ kubeconfig:
+ description:
+ - The path for the kubeconfig file to use for authentication
+ required: false
+ default: /etc/origin/master/admin.kubeconfig
+ aliases: []
+author:
+- "Mo Khan <monis@redhat.com>"
+extends_documentation_fragment: []
+'''
+
+EXAMPLES = '''
+oc_version:
+- name: get oc sdnvalidator
+ sdnvalidator:
+ register: oc_sdnvalidator
+'''