#!/bin/bash

export OPEROS_KUBERNETES_VERSION=1.8.5
export OPEROS_KUBE_DASHBOARD_VERSION=1.6.3
export OPEROS_KUBEDNS_VERSION=1.14.5
export OPEROS_CALICO_VERSION=2.5.1
export OPEROS_NGINX_VERSION=alpine
export OPEROS_WATERFRONT_VERSION=latest
export OPEROS_DASHBOARDS_VERSION=0.1
export OPEROS_GRAFANA_VERSION=3.1.1
export OPEROS_PROMETHEUS_VERSION=v2.0.0-beta.2
export OPEROS_NODE_EXPORTER_VERSION=v0.14.0
export OPEROS_RBD_PROVISIONER_VERSION=latest

export CONTROLLER_PRIVATE_IF=enp0s3
export CONTROLLER_PUBLIC_IF=enp0s8
export CONTROLLER_PUBLIC_IF_MODE=dhcp
export CONTROLLER_DISK=/dev/sda
export OPEROS_VERSION=0.1.x
export OPEROS_LICENSE_KEY=jcCPA6TU87
export OPEROS_INSTALL_ID=f9018b34-c508-4602-8b38-6af064acdd3b
export OPEROS_CONTROLLER_IP=192.168.33.10
export OPEROS_KUBE_API_INSECURE_PORT=8080
export OPEROS_KUBE_API_SECURE_PORT=8443
export OPEROS_NODE_MASK=/24
export OPEROS_POD_CIDR=10.10.0.0/16
export OPEROS_SERVICE_CIDR=10.11.0.0/16
export OPEROS_DNS_SERVICE_IP=10.11.0.2
export OPEROS_DNS_DOMAIN=cluster.local
export OPEROS_WORKER_STORAGE_PERCENTAGE=50
export OPEROS_CLUSTER_NAME=asd
export OPEROS_CLUSTER_ORG=asd
export OPEROS_CLUSTER_DEPARTMENT=asd
export OPEROS_CLUSTER_CITY=asd
export OPEROS_CLUSTER_PROVINCE=asd
export OPEROS_CLUSTER_COUNTRY=asd
export INSTALLER_ROOT_PASSWD=asdasd
export INSTALLER_CONTROLLER_KEY="-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAxlvWUPblu+cyBvO9TTAvAH7aSIf7gjtAjXRR1A+q8K8J5c1/
E7z2oX3H2+YtM8xwxe8sDTWatweARSj4Hv7fS7TLHqjpmc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