Skip to content

Commit

Permalink
Fix image references in README's (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovk6 authored Mar 25, 2020
1 parent 4165fce commit 8de25c2
Show file tree
Hide file tree
Showing 34 changed files with 708 additions and 599 deletions.
32 changes: 24 additions & 8 deletions k8s/activemq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,27 @@ export APP_INSTANCE_NAME=activemq-1
export NAMESPACE=default
```

Set up the image tag:

It is advised to use stable image reference which you can find on
[Marketplace Container Registry](https://marketplace.gcr.io/google/activemq).
Example:

```shell
export TAG="5.15.11-20200311-092341"
```

Alternatively you can use short tag which points to the latest image for selected version.
> Warning: this tag is not stable and referenced image might change over time.
```shell
export TAG="5.15"
```

Configure the container images:

```shell
export TAG=5.15.10
export IMAGE_ACTIVEMQ="marketplace.gcr.io/google/activemq5"
export IMAGE_ACTIVEMQ="marketplace.gcr.io/google/activemq"
```

Set or generate password for ActiveMQ console:
Expand Down Expand Up @@ -159,12 +175,12 @@ expanded manifest file for future updates to your app.
helm template chart/activemq \
--name "${APP_INSTANCE_NAME}" \
--namespace "${NAMESPACE}" \
--set "image.repo=${IMAGE_ACTIVEMQ}" \
--set "image.tag=${TAG}" \
--set "persistence.storageClass=${STORAGE_CLASS}" \
--set "persistence.size=${PERSISTENT_DISK_SIZE}" \
--set "consolePassword=${ACTIVEMQ_ADMIN_PASSWORD}" \
> ${APP_INSTANCE_NAME}_manifest.yaml
--set image.repo="${IMAGE_ACTIVEMQ}" \
--set image.tag="${TAG}" \
--set persistence.storageClass="${STORAGE_CLASS}" \
--set persistence.size="${PERSISTENT_DISK_SIZE}" \
--set consolePassword="${ACTIVEMQ_ADMIN_PASSWORD}" \
> "${APP_INSTANCE_NAME}_manifest.yaml"
```

#### Apply the manifest to your Kubernetes cluster
Expand Down
48 changes: 25 additions & 23 deletions k8s/cassandra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,29 +145,29 @@ option, change the value to `true`.
export METRICS_EXPORTER_ENABLED=false
```

Configure the container images:

Set up the image tag:

It is advised to use stable image reference which you can find on
[Marketplace Container Registry](https://marketplace.gcr.io/google/cassandra).
Example:

```shell
TAG=3.11
export IMAGE_CASSANDRA="marketplace.gcr.io/google/cassandra:${TAG}"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/cassandra/prometheus-to-sd:${TAG}"
export TAG="3.11.5-20200213-133738"
```

The images above are referenced by
[tag](https://docs.docker.com/engine/reference/commandline/tag). We recommend
that you pin each image to an immutable
[content digest](https://docs.docker.com/registry/spec/api/#content-digests).
This ensures that the installed application always uses the same images, until
you are ready to upgrade. To get the digest for the image, use the following
script:
Alternatively you can use short tag which points to the latest image for selected version.
> Warning: this tag is not stable and referenced image might change over time.
```shell
for i in "IMAGE_CASSANDRA" "IMAGE_METRICS_EXPORTER"; do
repo=$(echo ${!i} | cut -d: -f1);
digest=$(docker pull ${!i} | sed -n -e 's/Digest: //p');
export $i="$repo@$digest";
env | grep $i;
done
export TAG="3.11"
```

Configure the container images:

```shell
export IMAGE_CASSANDRA="marketplace.gcr.io/google/cassandra"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/cassandra/prometheus-to-sd:${TAG}"
```

#### Create the namespace in your Kubernetes cluster
Expand All @@ -186,12 +186,14 @@ expanded manifest file for future updates to the application.

```shell
helm template chart/cassandra \
--name $APP_INSTANCE_NAME \
--namespace $NAMESPACE \
--set cassandra.image=$IMAGE_CASSANDRA \
--set cassandra.replicas=$REPLICAS \
--set metrics.image=$IMAGE_METRICS_EXPORTER \
--set metrics.exporter.enabled=$METRICS_EXPORTER_ENABLED > "${APP_INSTANCE_NAME}_manifest.yaml"
--name "${APP_INSTANCE_NAME}" \
--namespace "${NAMESPACE}" \
--set cassandra.image.repo="${IMAGE_CASSANDRA}" \
--set cassandra.image.tag="${TAG}" \
--set cassandra.replicas="${REPLICAS}" \
--set metrics.image="${IMAGE_METRICS_EXPORTER}" \
--set metrics.exporter.enabled="${METRICS_EXPORTER_ENABLED}" \
> "${APP_INSTANCE_NAME}_manifest.yaml"
```

#### Apply the manifest to your Kubernetes cluster
Expand Down
44 changes: 30 additions & 14 deletions k8s/cert-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,26 @@ this option, change the value to `true`.
export METRICS_EXPORTER_ENABLED=true
```

Set up the image tag:

It is advised to use stable image reference which you can find on
[Marketplace Container Registry](https://marketplace.gcr.io/google/cert-manager).
Example:

```shell
export TAG="0.13.0-20200311-092536"
```

Alternatively you can use short tag which points to the latest image for selected version.
> Warning: this tag is not stable and referenced image might change over time.
```shell
export TAG="0.13"
```

Configure the container image:

```shell
export TAG=0.13
export IMAGE_CONTROLLER="marketplace.gcr.io/google/cert-manager"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/cert-manager/prometheus-to-sd:${TAG}"
```
Expand Down Expand Up @@ -190,20 +206,20 @@ expanded manifest file for future updates to the app.

```shell
helm template chart/cert-manager \
--name ${APP_INSTANCE_NAME} \
--namespace="${NAMESPACE}" \
--set controller.image.repo=${IMAGE_CONTROLLER} \
--set controller.image.tag=${TAG} \
--set controller.serviceAccountName=${CONTROLLER_SERVICE_ACCOUNT} \
--set controller.replicas=${CONTROLLER_REPLICAS:-1} \
--name "${APP_INSTANCE_NAME}" \
--namespace "${NAMESPACE}" \
--set controller.image.repo="${IMAGE_CONTROLLER}" \
--set controller.image.tag="${TAG}" \
--set controller.serviceAccountName="${CONTROLLER_SERVICE_ACCOUNT}" \
--set controller.replicas="${CONTROLLER_REPLICAS:-1}" \
--set deployer.image="gcr.io/cloud-marketplace-tools/k8s/deployer_helm:0.8.0" \
--set CDRJobServiceAccount=${CRD_SERVICE_ACCOUNT} \
--set webhook.serviceAccountName=${WEBHOOK_SERVICE_ACCOUNT} \
--set webhook.replicas=${WEBHOOK_REPLICAS:-1} \
--set cainjector.serviceAccountName=${CAINJECTOR_SERVICE_ACCOUNT} \
--set cainjector.replicas=${CAINJECTOR_REPLICAS:-1} \
--set metrics.exporter.enabled=${METRICS_EXPORTER_ENABLED:-false} \
> ${APP_INSTANCE_NAME}_manifest.yaml
--set CDRJobServiceAccount="${CRD_SERVICE_ACCOUNT}" \
--set webhook.serviceAccountName="${WEBHOOK_SERVICE_ACCOUNT}" \
--set webhook.replicas="${WEBHOOK_REPLICAS:-1}" \
--set cainjector.serviceAccountName="${CAINJECTOR_SERVICE_ACCOUNT}" \
--set cainjector.replicas="${CAINJECTOR_REPLICAS:-1}" \
--set metrics.exporter.enabled="${METRICS_EXPORTER_ENABLED:-false}" \
> "${APP_INSTANCE_NAME}_manifest.yaml"
```

#### Apply the manifest to your Kubernetes cluster
Expand Down
39 changes: 19 additions & 20 deletions k8s/consul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,29 @@ export APP_INSTANCE_NAME=consul-1
export NAMESPACE=default
```

Configure the container image:
Set up the image tag:

It is advised to use stable image reference which you can find on
[Marketplace Container Registry](https://marketplace.gcr.io/google/consul).
Example:

```shell
TAG=1.4
export IMAGE_CONSUL="marketplace.gcr.io/google/consul:${TAG}"
export IMAGE_CONSUL_EXPORTER="marketplace.gcr.io/google/consul/consul-exporter:${TAG}"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/consul/prometheus-to-sd:${TAG}"
export TAG="1.4.5-20200311-091931"
```

The images above are referenced by
[tag](https://docs.docker.com/engine/reference/commandline/tag). We recommend
that you pin each image to an immutable
[content digest](https://docs.docker.com/registry/spec/api/#content-digests).
This ensures that the installed application always uses the same images,
until you are ready to upgrade. To get the digest for the image, use the
following script:
Alternatively you can use short tag which points to the latest image for selected version.
> Warning: this tag is not stable and referenced image might change over time.
```shell
for i in "IMAGE_CONSUL" "IMAGE_CONSUL_EXPORTER" "IMAGE_METRICS_EXPORTER"; do
repo=$(echo ${!i} | cut -d: -f1);
digest=$(docker pull ${!i} | sed -n -e 's/Digest: //p');
export $i="$repo@$digest";
echo ${!i};
done
export TAG="1.4"
```

Configure the container image:

```shell
export IMAGE_CONSUL="marketplace.gcr.io/google/consul:${TAG}"
export IMAGE_CONSUL_EXPORTER="marketplace.gcr.io/google/consul/consul-exporter:${TAG}"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/consul/prometheus-to-sd:${TAG}"
```

Optionally, you can set the number of replicas for Consul.
Expand Down Expand Up @@ -224,8 +223,8 @@ expanded manifest file for future updates to the application.

```shell
helm template chart/consul \
--name ${APP_INSTANCE_NAME} \
$( [[ -n "${NAMESPACE}" ]] && printf '%s=%s' '--namespace' ${NAMESPACE} ) \
--name "${APP_INSTANCE_NAME}" \
--namespace "$NAMESPACE" \
--set global.image=${IMAGE_CONSUL} \
--set server.prometheus_exporter.image=${IMAGE_CONSUL_EXPORTER} \
--set metrics.image=${IMAGE_METRICS_EXPORTER} \
Expand Down
67 changes: 33 additions & 34 deletions k8s/drupal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,34 +163,33 @@ this option, change the value to `true`.
export METRICS_ENABLED=false
```

Set up the image tag:

It is advised to use stable image reference which you can find on
[Marketplace Container Registry](https://marketplace.gcr.io/google/drupal).
Example:

```shell
export TAG="8.8.2-20200311-092629"
```

Alternatively you can use short tag which points to the latest image for selected version.
> Warning: this tag is not stable and referenced image might change over time.
```shell
export TAG="8.8"
```

Configure the container images:

```shell
TAG=8.7
export IMAGE_DRUPAL="marketplace.gcr.io/google/drupal"
export IMAGE_APACHE_EXPORTER="marketplace.gcr.io/google/drupal/apache-exporter:${TAG}"
export IMAGE_MARIADB="marketplace.gcr.io/google/drupal/mariadb:${TAG}"
export IMAGE_MYSQL_EXPORTER="marketplace.gcr.io/google/drupal/mysqld-exporter:${TAG}"
export IMAGE_METRICS_EXPORTER="marketplace.gcr.io/google/drupal/prometheus-to-sd:${TAG}"
```

The images above are referenced by
[tag](https://docs.docker.com/engine/reference/commandline/tag). We recommend
that you pin each image to an immutable
[content digest](https://docs.docker.com/registry/spec/api/#content-digests).
This ensures that the installed app always uses the same images, until
you are ready to upgrade. To get the digest for an image, use the following
script:

```shell
for i in "IMAGE_APACHE_EXPORTER" "IMAGE_MARIADB" "IMAGE_MYSQL_EXPORTER" "IMAGE_METRICS_EXPORTER"; do
repo=$(echo ${!i} | cut -d: -f1);
digest=$(docker pull ${!i} | sed -n -e 's/Digest: //p');
export $i="$repo@$digest";
echo ${!i};
done
```

Set or generate passwords:

```shell
Expand Down Expand Up @@ -247,22 +246,22 @@ expanded manifest file for future updates to the app.
helm template chart/drupal \
--name "${APP_INSTANCE_NAME}" \
--namespace "${NAMESPACE}" \
--set "drupal.image.repo=${IMAGE_DRUPAL}" \
--set "drupal.image.tag=${TAG}" \
--set "drupal.password=${DRUPAL_PASSWORD}" \
--set "db.image=${IMAGE_MARIADB}" \
--set "db.rootPassword=${ROOT_DB_PASSWORD}" \
--set "db.drupalPassword=${DRUPAL_DB_PASSWORD}" \
--set "db.exporter.image=${IMAGE_MYSQL_EXPORTER}" \
--set "db.exporter.password=${EXPORTER_DB_PASSWORD}" \
--set "apache.exporter.image=${IMAGE_APACHE_EXPORTER}" \
--set "metrics.image=${IMAGE_METRICS_EXPORTER}" \
--set "metrics.exporter.enabled=${METRICS_ENABLED}" \
--set "enablePublicServiceAndIngress=${PUBLIC_SERVICE_AND_INGRESS_ENABLED}" \
--set "tls.base64EncodedPrivateKey=${TLS_CERTIFICATE_KEY}" \
--set "tls.base64EncodedCertificate=${TLS_CERTIFICATE_CRT}" \
--set "metrics.exporter.enabled=${METRICS_EXPORTER_ENABLED}" \
> ${APP_INSTANCE_NAME}_manifest.yaml
--set drupal.image.repo="${IMAGE_DRUPAL}" \
--set drupal.image.tag="${TAG}" \
--set drupal.password="${DRUPAL_PASSWORD}" \
--set db.image="${IMAGE_MARIADB}" \
--set db.rootPassword="${ROOT_DB_PASSWORD}" \
--set db.drupalPassword="${DRUPAL_DB_PASSWORD}" \
--set db.exporter.image="${IMAGE_MYSQL_EXPORTER}" \
--set db.exporter.password="${EXPORTER_DB_PASSWORD}" \
--set apache.exporter.image="${IMAGE_APACHE_EXPORTER}" \
--set metrics.image="${IMAGE_METRICS_EXPORTER}" \
--set metrics.exporter.enabled="${METRICS_ENABLED}" \
--set enablePublicServiceAndIngress="${PUBLIC_SERVICE_AND_INGRESS_ENABLED}" \
--set tls.base64EncodedPrivateKey="${TLS_CERTIFICATE_KEY}" \
--set tls.base64EncodedCertificate="${TLS_CERTIFICATE_CRT}" \
--set metrics.exporter.enabled="${METRICS_EXPORTER_ENABLED}" \
> "${APP_INSTANCE_NAME}_manifest.yaml"
```

#### Apply the manifest to your Kubernetes cluster
Expand Down
Loading

0 comments on commit 8de25c2

Please sign in to comment.