Skip to content

Instantly share code, notes, and snippets.

@cdoan1
cdoan1 / terraform-icp-azure.md
Last active February 14, 2019 07:06
terraform icp azure notes

Starting Up Pageant from the Command Line

pageant can be started from the command line with the private key loaded as follows

pageant -T ~/.ssh/id_rsa.ppk

clone the terraform-icp-azure repo

#!/bin/bash
echo "Sample Script"
#!/bin/bash
HCURL=${1:-$HCURL}
HCUSER=${2:-$HCUSER}
HCPASS=${3:-$HCPASS}
MCURL=${4:-$MCURL}
MCUSER=${5:-$MCUSER}
MCPASS=${6:-$MCPASS}
# login to managed cluster
RAM/CPU 16/8 32/8 64/16
CLIENT heapSize 2 4 8
CLIENT memoryLimit 4 8 16
DATA heapSize 3 4 8
DATA memoryLimit 6 8 16
MASTER heapSize 1 1 2
MASTER memoryLimit 1.5 2 3
LOGSTASH heapSize 1 1 4
LOGSTASH memoryLimit 2 2 8
TOTAL (GB) 13.5 20 43
logging:
xpack:
monitoring: true
logstash:
heapSize: 1
memoryLimit: 2
replicas: "1"
elasticsearch:
client:
heapSize: 2
---
apiVersion: batch/v1
kind: Job
metadata:
name: es-stress
namespace: kube-system
spec:
template:
metadata:
labels:
[
{
"image-key": "application_ui",
"image-name": "application-ui-rhel8",
"image-version": "v1.0.0",
"image-tag": "v1.0.0-5",
"image-remote": "quay.io/acm-d",
"image-digest": "sha256:5448ca3caff598e983a7a6909aec9fc74156825ab781f9748f26c52b16281216"
},
{
  1. creating an operatorsource can be done to test operators show up in the catalog
[root@f25-h26-000-r630 cdoan]# oc get operatorsource --all-namespaces
NAMESPACE               NAME                       TYPE          ENDPOINT              REGISTRY                DISPLAYNAME   PUBLISHER   STATUS      MESSAGE                                       AGE
openshift-marketplace   rh-verified-applications   appregistry   https://quay.io/cnr   rh-verified-operators                             Succeeded   The object has been successfully reconciled   2d18h

TLDR oc image mirror between registry works well, but if you try to redirect to intermidate local file, to then be served locally, the digest is not maintained. Serving locally is experimental as written in the help.

Having intermediate file is useful if in your enterprise you cannot proxy to the internet and download public images into a registry.

Workarounds

  • It is possible to stand up docker registry that references a volume. Perform the oc image mirror quay privaterepo. Tar up the data volume, move it inside the enterprise, and mount it with the docker registry running inside the enterprise, and perform oc image mirror privaterepo enterpriserepo.
  • It should also be possible to create a custom registry that includes the etcd-operator and etcd images preloaded.
  1. backup the data folder, after image is loaded