Created
October 11, 2019 13:23
-
-
Save afrittoli/8440b545a6601f60aa233b8e70fc2b62 to your computer and use it in GitHub Desktop.
Configuring IBM COS as artifact storage for Tekton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a COS service instance in IBM Cloud | |
# Create Service credentials for the service - tick "Include HMAC Credentials" | |
# Copy your key id access key into variables | |
export AWS_ACCESS_KEY_ID=[your key] | |
export AWS_SECRET_ACCESS_KEY=[your secret] | |
# Create a boto config file | |
# Note that I'm using the eu-geo endpoint, you can switch to the one local to you | |
# but make sure your bucket is either replicated across geos or created in the same | |
# geo you're using here. | |
cat <<EOF > boto_config | |
[Credentials] | |
aws_access_key_id = $AWS_ACCESS_KEY_ID | |
aws_secret_access_key = $AWS_SECRET_ACCESS_KEY | |
[s3] | |
host = s3.eu-geo.objectstorage.softlayer.net | |
use-sigv4 = True | |
[Boto] | |
https_validate_certificates = True | |
[GSUtil] | |
prefer_api = xml | |
EOF | |
# Make sure your pointing to the right cluster | |
kubectl config current-context | |
# Create a secret with your boto config | |
kubectl create secret generic pipelines-cos-credentials --from-file=boto_config=boto_config_ibmcloud | |
# Setup Tekton config map to use the new secret | |
# You can also do this with kubectl patch, or edit the default config file config/config-artifact-bucket.yaml | |
kubectl edit cm/config-artifact-bucket -n tekton-pipelines | |
# [this opens an editor] Setup your config so that it looks like: | |
apiVersion: v1 | |
kind: ConfigMap | |
data: | |
bucket.service.account.field.name: BOTO_CONFIG | |
bucket.service.account.secret.key: boto_config | |
bucket.service.account.secret.name: pipelines-cos-credentials | |
location: s3://tektonstorage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment