Skip to content

Instantly share code, notes, and snippets.

@usrbinkat
Last active February 19, 2021 23:23
Show Gist options
  • Save usrbinkat/0900300d95f0a491172452ee8e955c88 to your computer and use it in GitHub Desktop.
Save usrbinkat/0900300d95f0a491172452ee8e955c88 to your computer and use it in GitHub Desktop.
Koffer collector-operators testing
#!/bin/bash -x
#
# Setup:
# .
# ├── bundle
# ├── koffer.sh
# └── pull-secret.json
#
# Place pull secret in $(pwd)/pull-secret.json
#  - https://cloud.redhat.com/openshift/install/metal/user-provisioned
#
# Install Dependencies:
#  - sudo dnf install -y podman fuse-overlayfs
#################################################################################
runPath="$(pwd)"
write_config () {
cat <<EOF > ${runPath}/koffer.yml
koffer:
  silent: true
  plugins:
    collector-operators:
      env:
        - name: "WALLE"
          value: "true"
        - name: "BUNDLE"
          value: "true"
        - name: "OPERATORS"
          value: "kiali-ossm,ocs-operator,quay-operator,jaeger-product,rhsso-operator,cluster-logging,servicemeshoperator,compliance-operator,elasticsearch-operator"
      organization: codesparta
      service: github.com
      version: master
EOF
}
run_koffer () {
mkdir -p $(pwd)/bundle && \
sudo podman run -it --rm --privileged --device /dev/fuse \
    --volume ${runPath}/bundle:/root/bundle:z \
    --volume ${runPath}/koffer.yml:/root/.koffer/config.yml:z \
    --volume ${runPath}/pull-secret.json:/root/.docker/config.json:z \
  quay.io/cloudctl/koffer:extra bundle
}
run () {
  podman pull quay.io/cloudctl/koffer:extra
  write_config
  run_koffer
}
run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment