diff --git a/.circleci/config.yml b/.circleci/config.yml index 9938d63..e0c9057 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,54 +2,20 @@ version: 2 jobs: lint: docker: - - image: quay.io/deis/go-dev:v1.2.0 + - image: quay.io/deis/helm-chart-publishing-tools:v0.1.0 + working_directory: /charts steps: - # TODO: save the checked-out code in a working directory. - # do the same with the installed helm and az binaries - checkout - - run: - name: Install Basic Utilities - command: ./install-base-prereqs.sh - working_directory: scripts - - run: - name: Install Helm - command: ./install-helm.sh - working_directory: scripts - run: name: Helm Lint command: ./helm-lint.sh working_directory: scripts - # this step tests the install script for the Azure CLI - test-install-az-cli: - docker: - - image: quay.io/deis/go-dev:v1.2.0 - steps: - - checkout - - run: - name: Install Basic Utilities - command: ./install-base-prereqs.sh - working_directory: scripts - - run: - name: Install the Azure CLI - command: ./install-azure-cli.sh - working_directory: scripts helm-sync: docker: - - image: quay.io/deis/go-dev:v1.2.0 + - image: quay.io/deis/helm-chart-publishing-tools:v0.1.0 + working_directory: /charts steps: - checkout - - run: - name: Install Basic Utilities - command: ./install-base-prereqs.sh - working_directory: scripts - - run: - name: Install Helm - command: ./install-helm.sh - working_directory: scripts - - run: - name: Install Azure CLI 2.0 - command: ./install-azure-cli.sh - working_directory: scripts - run: name: Sync Helm Repository command: ./helm-repo-sync.sh @@ -72,12 +38,6 @@ workflows: filters: branches: ignore: master - - test-install-az-cli: - requires: - - hold - filters: - branches: - ignore: master test-and-deploy-master: jobs: - lint: diff --git a/open-service-broker-azure/.helmignore b/open-service-broker-azure/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/open-service-broker-azure/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/open-service-broker-azure/Chart.yaml b/open-service-broker-azure/Chart.yaml deleted file mode 100644 index 6d6e2c5..0000000 --- a/open-service-broker-azure/Chart.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Open Service Broker For Azure -name: open-service-broker-azure -version: 0.7.0 -appVersion: v0.9.0-alpha -keywords: - - azure - - services - - service broker -home: https://github.com/azure/open-service-broker-azure -sources: - - https://github.com/azure/open-service-broker-azure - - https://hub.docker.com/r/microsoft/azure-service-broker/ -maintainers: - - name: Kent Rancourt - email: kent.rancourt@microsoft.com - - name: Jim Zimmerman - email: jim.zimmerman@microsoft.com -tillerVersion: ">=2.7.0-rc1" diff --git a/open-service-broker-azure/README.md b/open-service-broker-azure/README.md deleted file mode 100644 index 6f8f433..0000000 --- a/open-service-broker-azure/README.md +++ /dev/null @@ -1,136 +0,0 @@ -# Open Service Broker for Azure - -[Open Service Broker for Azure](https://github.com/Azure/open-service-broker-azure) is the -open source, [Open Service Broker](https://www.openservicebrokerapi.org/) -compatible API server that provisions managed services in the Microsoft -Azure public cloud. - -This chart bootstraps Open Service Broker for Azure in your Kubernetes cluster. - -## Prerequisites - -- [Kubernetes](https://kubernetes.io/) 1.7+ with RBAC enabled -- The - [Kubernetes Service Catalog](https://github.com/kubernetes-incubator/service-catalog/blob/master/docs/install.md) - software has been installed -- An [Azure subscription](https://azure.microsoft.com/en-us/free/) -- The Azure CLI: You can -[install it locally](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) -or use it in the -[Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview?view=azure-cli-latest) -- A _service principal_ with the `Contributor` role on your Azure subscription - -## Obtain Your Subscription ID - -```console -$ export AZURE_SUBSCRIPTION_ID=$(az account show --query id | sed s/\"//g) -``` - -## Creating a Service Principal - -```console -$ az ad sp create-for-rbac -``` - -The new service principal will be assigned, by default, to the `Contributor` -role. The output of the command above will be similar to the following: - -```console -{ - "appId": "redacted", - "displayName": "azure-cli-xxxxxx", - "name": "http://azure-cli-xxxxxx", - "password": "redacted", - "tenant": "redacted" -} -``` - -For convenience in subsequent steps, we will export several of the fields above -as environment variables: - -```console -$ export AZURE_TENANT_ID= -$ export AZURE_CLIENT_ID= -$ export AZURE_CLIENT_SECRET= -``` - -## Installing the Chart - -Installation of this chart is simple. First, ensure that you've [added the -`azure` repository](../README.md#installing-charts). Then, install from the -`azure` repo: - -```console -$ helm install azure/open-service-broker-azure --name osba --namespace osba \ - --set azure.subscriptionId=$AZURE_SUBSCRIPTION_ID \ - --set azure.tenantId=$AZURE_TENANT_ID \ - --set azure.clientId=$AZURE_CLIENT_ID \ - --set azure.clientSecret=$AZURE_CLIENT_SECRET -``` - -If you'd like to customize the installation, please see the -[configuration](#configuration) section to see options that can be -configured during installation. - -To verify the service broker has been deployed and show installed service classes and plans: - -```console -$ kubectl get clusterservicebroker -o yaml - -$ kubectl get clusterserviceclasses -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName - -$ kubectl get clusterserviceplans -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName,SERVICE\ CLASS:.spec.clusterServiceClassRef.name --sort-by=.spec.clusterServiceClassRef.name -``` - -## Uninstalling the Chart - -To uninstall/delete the `osba` deployment: - -```console -$ helm delete osba --purge -``` - -The command removes all the Kubernetes components associated with the chart and -deletes the release. - -## Configuration - -The following tables lists the configurable parameters of the Azure Service -Broker chart and their default values. - -| Parameter | Description | Default | -| --------- | ----------- | ------- | -| `image.repository` | Docker image location, _without_ the tag. | `"microsoft/azure-service-broker"` | -| `image.tag` | Tag / version of the Docker image. | `"v0.4.0-alpha"` | -| `image.pullPolicy` | `"IfNotPresent"`, `"Always"`, or `"Never"`; When launching a pod, this option indicates when to pull the OSBA Docker image. | `"IfNotPresent"` | -| `registerBroker` | Whether to register this broker with the Kubernetes Service Catalog. If true, the Kubernetes Service Catalog must already be installed on the cluster. Marking this option false is useful for scenarios wherein one wishes to host the broker in a separate cluster than the Service Catalog (or other client) that will access it. | `true` | -| `service.type` | Type of service; valid values are `"ClusterIP"`, `"LoadBalancer"`, and `"NodePort"`. `"ClusterIP"` is sufficient in the average case where OSBA only receives traffic from within the cluster-- e.g. from Kubernetes Service Catalog. | `"ClusterIP"` | -| `service.nodePort.port` | _If and only if_ `service.type` is set to `"NodePort"`, `service.nodePort.port` indicates the port this service should bind to on each Kubernetes node. | `30080` | -| `azure.environment` | Indicates which Azure public cloud to use. Valid values are `"AzureCloud"` and `"AzureChinaCloud"`. | `"AzureCloud"` | -| `azure.subscriptionId` | Identifies the Azure subscription into which OSBA will provision services. | none | -| `azure.tenantId` | Identifies the Azure Active Directory to which the _service principal_ used by OSBA to access the Azure subscription belongs. | none | -| `azure.clientId` | Identifies the _service principal_ used by OSBA to access the Azure subscription. | none | -| `azure.clientSecret` | Key/password for the _service principal_ used by OSBA to access the Azure subscription. | none | -| `basicAuth.username` | Specifies the basic auth username that clients (e.g. the Kubernetes Service Catalog) must use when connecting to OSBA. | `"username"`; __Do not use this default value in production!__ | -| `basicAuth.password` | Specifies the basic auth password that clients (e.g. the Kubernetes Service Catalog) must use when connecting to OSBA. | `"password"`; __Do not use this default value in production!__ | -| `encryptionKey` | Specifies the key used by OSBA for applying AES-256 encryption to sensitive (or potentially sensitive) data. | `"This is a key that is 256 bits!!"`; __Do not use this default value in production!__ | -| `modules.minStability` | Specifies the minimum level of stability an OSBA module must meet for the services and plans it provides to be included in OSBA's catalog of offerings. Valid values are `"ALPHA"`, `"BETA"`, and `"STABLE"`. | `"ALPHA"`; __Only use `"STABLE"` modules in production!__ | -| `redis.embedded` | OSBA uses Redis for data persistence and as a message queue. This option indicates whether an on-cluster Redis deployment should be included when installing this chart. If set to `false`, connection details for a remote Redis cache must be provided. | `true`; __Do not use the embedded Redis cache in production!__ | -| `redis.host` | _If and only if_ `redis.embedded` is `false`, this option specifies the location of the remote Redis cache. | none | -| `redis.port` | _If and only if_ `redis.embedded` is `false`, this option specifies the port to connect to on the remote Redis host. | `6380` | -| `redis.redisPassword` | Specifies the Redis password. If `redis.embedded` is `true`, this option sets the password on the Redis cache itself _and_ provides it to OSBA. If `redis.embedded` is `false`, this option only provides the password to OSBA. In that case, the value of this option must be the correct password for the remote Redis cache. | `"password"`; __Do not use this default value in production!__ | -| `redis.enableTls` | _If and only if_ `redis.embedded` is `false`, this option specifies whether to use a secure connection to the remote Redis host. | `true` | - -Specify a value for each option using the `--set =` switch on the -`helm install` command. That switch can be invoked multiple times to set -multiple options. - -Alternatively, copy the charts default values to a file, edit the file to your -liking, and reference that file in your `helm install` command: - -```console -$ helm inspect values azure/open-service-broker-azure > values.yaml -$ vim my-values.yaml -$ helm install azure/open-service-broker-azure --name osba --namespace osba --values my-values.yaml -``` - diff --git a/open-service-broker-azure/requirements.lock b/open-service-broker-azure/requirements.lock deleted file mode 100644 index 1751c04..0000000 --- a/open-service-broker-azure/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: redis - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 0.10.0 -digest: sha256:9d6cb823d583ff265cc859ffd295a64cb8e5e22acb09ce7a266417b388d9f99c -generated: 2018-03-02T08:22:27.387839687-07:00 diff --git a/open-service-broker-azure/requirements.yaml b/open-service-broker-azure/requirements.yaml deleted file mode 100644 index 75b56f7..0000000 --- a/open-service-broker-azure/requirements.yaml +++ /dev/null @@ -1,5 +0,0 @@ -dependencies: -- name: redis - version: 0.10.0 - condition: redis.embedded - repository: https://kubernetes-charts.storage.googleapis.com/ diff --git a/open-service-broker-azure/templates/NOTES.txt b/open-service-broker-azure/templates/NOTES.txt deleted file mode 100644 index c3ba40a..0000000 --- a/open-service-broker-azure/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -{{- if and (not .Values.registerBroker) (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} -{{- if eq .Values.service.type "LoadBalancer" }} -1. To get Open Service Broker for Azure's load balancer IP/hostname: - - NOTE: It may take a few minutes for this to become available. - - You can watch the status by running: - - $ kubectl get svc {{ template "fullname" . }} -n {{ .Release.Namespace }} -w - - Once 'EXTERNAL-IP' is no longer '': - - $ kubectl describe svc {{ template "fullname" . }} -n {{ .Release.Namespace }} | grep Ingress: | awk '{print $3}' -{{ end }} -{{- if eq .Values.service.type "NodePort" }} -1. Open Service Broker for Azure's node port: {{ .Values.service.nodePort.port }} -{{ end }} -2. Credentials for connecting to the broker: - - Username: {{ .Values.basicAuth.username }} - Password: {{ .Values.basicAuth.password }} -{{- end }} diff --git a/open-service-broker-azure/templates/_helpers.tpl b/open-service-broker-azure/templates/_helpers.tpl deleted file mode 100644 index f0d83d2..0000000 --- a/open-service-broker-azure/templates/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/open-service-broker-azure/templates/auth-secret.yaml b/open-service-broker-azure/templates/auth-secret.yaml deleted file mode 100644 index 5c596c3..0000000 --- a/open-service-broker-azure/templates/auth-secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "fullname" . }}-auth - labels: - app: {{ template "fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -type: Opaque -data: - username: {{ b64enc .Values.basicAuth.username }} - password: {{ b64enc .Values.basicAuth.password }} diff --git a/open-service-broker-azure/templates/broker.yaml b/open-service-broker-azure/templates/broker.yaml deleted file mode 100644 index 97e0fa7..0000000 --- a/open-service-broker-azure/templates/broker.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.registerBroker }} -apiVersion: servicecatalog.k8s.io/v1beta1 -kind: ClusterServiceBroker -metadata: - name: osba -spec: - url: http://{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - authInfo: - basic: - secretRef: - name: "{{ template "fullname" . }}-auth" - namespace: {{ .Release.Namespace | quote }} -{{- end }} diff --git a/open-service-broker-azure/templates/deployment.yaml b/open-service-broker-azure/templates/deployment.yaml deleted file mode 100644 index 9bbf10f..0000000 --- a/open-service-broker-azure/templates/deployment.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: {{ template "fullname" . }} - labels: - app: {{ template "fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - app: {{ template "fullname" . }} - template: - metadata: - labels: - app: {{ template "fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - spec: - containers: - - name: open-service-broker-azure - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: ENVIRONMENT - value: {{ .Values.azure.environment }} - - name: AZURE_SUBSCRIPTION_ID - value: {{ required "A value is required for azure.subscriptionId" .Values.azure.subscriptionId }} - - name: AZURE_TENANT_ID - value: {{ required "A value is required for azure.tenantId" .Values.azure.tenantId }} - - name: AZURE_CLIENT_ID - value: {{ required "A value is required for azure.clientId" .Values.azure.clientId }} - - name: AZURE_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: {{ template "fullname" . }} - key: azure-client-secret - - name: AZURE_DEFAULT_LOCATION - value: {{ .Values.azure.defaultLocation }} - - name: REDIS_HOST - {{- if .Values.redis.embedded }} - value: {{ .Release.Name }}-redis - {{- else }} - value: {{ required "A value is required for redis.host" .Values.redis.host }} - - name: REDIS_PORT - value: {{ .Values.redis.port | quote }} - - name: REDIS_ENABLE_TLS - value: {{ .Values.redis.enableTls | quote }} - {{- end }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "fullname" . }} - key: redis-password - - name: AES256_KEY - valueFrom: - secretKeyRef: - name: {{ template "fullname" . }} - key: encryption-key - - name: BASIC_AUTH_USERNAME - value: {{ .Values.basicAuth.username }} - - name: BASIC_AUTH_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "fullname" . }} - key: basic-auth-password - - name: MIN_STABILITY - value: {{ .Values.modules.minStability }} - ports: - - containerPort: 8080 - readinessProbe: - tcpSocket: - port: 8080 - failureThreshold: 1 - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 - livenessProbe: - tcpSocket: - port: 8080 - failureThreshold: 3 - initialDelaySeconds: 30 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 2 diff --git a/open-service-broker-azure/templates/secret.yaml b/open-service-broker-azure/templates/secret.yaml deleted file mode 100644 index c9b4c0a..0000000 --- a/open-service-broker-azure/templates/secret.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "fullname" . }} - labels: - app: {{ template "fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -stringData: - azure-client-secret: {{ required "A value is required for azure.clientSecret" .Values.azure.clientSecret }} - encryption-key: {{ .Values.encryptionKey }} - redis-password: {{ .Values.redis.redisPassword | quote }} - basic-auth-password: {{ .Values.basicAuth.password | quote }} - \ No newline at end of file diff --git a/open-service-broker-azure/templates/service.yaml b/open-service-broker-azure/templates/service.yaml deleted file mode 100644 index b9172d1..0000000 --- a/open-service-broker-azure/templates/service.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "fullname" . }} - labels: - app: {{ template "fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - type: {{ .Values.service.type }} - selector: - app: {{ template "fullname" . }} - ports: - - name: http - protocol: TCP - port: 80 - {{- if eq .Values.service.type "NodePort" }} - nodePort: {{ .Values.service.nodePort.port }} - {{- end }} - targetPort: 8080 diff --git a/open-service-broker-azure/values.yaml b/open-service-broker-azure/values.yaml deleted file mode 100644 index d7ae963..0000000 --- a/open-service-broker-azure/values.yaml +++ /dev/null @@ -1,86 +0,0 @@ -replicaCount: 1 - -image: - ## Image location, NOT including the tag - repository: microsoft/azure-service-broker - ## Image tag - tag: v0.9.0-alpha - ## "IfNotPresent", "Always", or "Never" - pullPolicy: IfNotPresent - -## Whether to register this broker with the Kubernetes Service Catalog. If true, -## the Kubernetes Service Catalog must already be installed on the cluster. -## Marking this option false is useful for scenarios wherein one wishes to host -## the broker in a separate cluster than the Service Catalog (or other client) -## that will access it. -registerBroker: true - -service: - ## Type of service; valid values are "ClusterIP", "LoadBalancer", and - ## "NodePort". "ClusterIP" is sufficient in the average case where a service - ## catalog installation in the same cluster is the only client that needs to - ## communicate with this broker. i.e. The broker does not need to receive - ## inbound requests from outside the cluster. - type: ClusterIP - ## Further configuration if service is of type "NodePort" - nodePort: - ## Available port in allowable range (e.g. 30000 - 32767 on minikube) - port: 30080 - -azure: - ## Valid values are "AzureCloud" and "AzureChinaCloud" - environment: AzureCloud - ## Required; this is the identifier for the Azure account into which services - ## will be provisioned. BE AWARE THAT DOING SO WILL COST YOU MONEY! - subscriptionId: - ## Required; this is the identifier of the Azure Service Directory that - ## contains the service principal the broker will use for interacting with - ## Azure. - tenantId: - ## Required; this identifies the service principal. When viewed in Azure - ## Active Directory, this is also known as the Application ID. - clientId: - ## Required - clientSecret: - ## Optional; default Azure location for provisioning resources - defaultLocation: - -## Basic auth credentials that can later be used to access this broker -basicAuth: - ## DO NOT USE THIS DEFAULT VALUE IN PRODUCTION - username: username - ## DO NOT USE THIS DEFAULT VALUE IN PRODUCTION - password: password - -## A 256 bit key used for database encryption -## NB: 32 ascii characters == 256 bits -## DO NOT USE THIS DEFAULT VALUE IN PRODUCTION -encryptionKey: This is a key that is 256 bits!! - -modules: - ## Minimum stability required for a module's services and plans to be listed - ## in the broker's catalog. For production, use STABLE only! - minStability: EXPERIMENTAL - -## Redis configuration -redis: - ## Should a containerized Redis server be included in the Helm release? - embedded: true - - ## Required if not embedded - host: - - ## If not embedded, specifies the port for the client to connect to. - ## 6380 is the port often used for Redis secured using TLS. - port: 6380 - - ## If embedded, specifies the password the server will require AND the - ## password the client will use. If not embedded, this only specifies the - ## password the client will use. It must be the correct password for whatever - ## external Redis server it connects to. - ## DO NOT USE THIS DEFAULT VALUE IN PRODUCTION - redisPassword: password - - ## If not emnedded, specifies whether to use a secure connection to the - ## remote Redis host - enableTls: true diff --git a/scripts/helm-repo-sync.sh b/scripts/helm-repo-sync.sh index 473f1ee..e085fbe 100755 --- a/scripts/helm-repo-sync.sh +++ b/scripts/helm-repo-sync.sh @@ -13,9 +13,6 @@ REPO_DIR=repo mkdir -p $REPO_DIR echo "entering $REPO_DIR" cd $REPO_DIR -# download the existing repo's index.yaml so that we can merge it later -echo "downloading existing index.yaml" -az storage blob download --container-name $AZURE_STORAGE_CONTAINER --file index.yaml --name index.yaml for dir in `ls ../..`;do if [ ! -f ../../$dir/Chart.yaml ];then echo "skipping $dir because it lacks a Chart.yaml file" @@ -26,6 +23,28 @@ for dir in `ls ../..`;do fi done +##### +# upload packaged charts to Azure blob storage +##### + +# AZURE_STORAGE_CONNECTION_STRING will be used for auth in the following command +echo "uploading packaged charts from $PWD" +az storage blob upload-batch \ + --source . \ + --destination $AZURE_STORAGE_CONTAINER + +# attempt to acquire a lock on the container +az storage container lease acquire \ + --container-name $AZURE_STORAGE_CONTAINER \ + --lease-duration 60 + +# download the existing repo's index.yaml so that we can merge it later +echo "downloading existing index.yaml" +az storage blob download \ + --container-name $AZURE_STORAGE_CONTAINER \ + --name index.yaml \ + --file index.yaml + ##### # index the charts, merging with the old index.yaml so charts are versioned ##### @@ -33,9 +52,12 @@ REPO_ROOT=https://kubernetescharts.blob.core.windows.net helm repo index --url "$REPO_ROOT/$AZURE_STORAGE_CONTAINER" --merge index.yaml . ##### -# upload to Azure blob storage +# upload updated index to Azure blob storage ##### # AZURE_STORAGE_CONNECTION_STRING will be used for auth in the following command -echo "uploading from $PWD" -az storage blob upload-batch --destination $AZURE_STORAGE_CONTAINER --source . +echo "uploading updated index from $PWD" +az storage blob upload \ + --container-name $AZURE_STORAGE_CONTAINER \ + --file index.yaml \ + --name index.yaml diff --git a/scripts/install-azure-cli.sh b/scripts/install-azure-cli.sh deleted file mode 100755 index 3daa4f1..0000000 --- a/scripts/install-azure-cli.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# About -# -# This script installs the Azure CLI. It copies the steps from the following link: -# -# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest -# -# under the "Install with apt package manager" section - -# first do an update and install apt-transport-https -apt-get update -apt-get install -y apt-transport-https - -# the add keys for the MSFT apt repo -echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | tee /etc/apt/sources.list.d/azure-cli.list -apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 - -# then update again and install azure-cli -apt-get update -apt-get install -y azure-cli diff --git a/scripts/install-base-prereqs.sh b/scripts/install-base-prereqs.sh deleted file mode 100755 index 7210beb..0000000 --- a/scripts/install-base-prereqs.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -apt-get update -apt-get install -y curl wget tar ca-certificates diff --git a/scripts/install-helm.sh b/scripts/install-helm.sh deleted file mode 100755 index 22fb8cc..0000000 --- a/scripts/install-helm.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -##### -# download the helm CLI & initialize the helm dir -##### -HELM_URL=https://storage.googleapis.com/kubernetes-helm -HELM_TARBALL=helm-v2.5.1-linux-amd64.tar.gz -STABLE_REPO_URL=https://kubernetes-charts.storage.googleapis.com/ -INCUBATOR_REPO_URL=https://kubernetes-charts-incubator.storage.googleapis.com/ -wget -q ${HELM_URL}/${HELM_TARBALL} -tar xzfv ${HELM_TARBALL} - -cp ./linux-amd64/helm /usr/local/bin/helm -helm init --client-only