Last active
January 16, 2018 11:35
-
-
Save jasonkeene/77e8d44a557fb5733e5fad5bb9db85cd to your computer and use it in GitHub Desktop.
Download a product from GCS and upload it to OpsMan
This file contains hidden or 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
#!/bin/bash | |
set -e | |
tile=pivotal-container-service-0.7.1-build.6.pivotal | |
om_username=some-username | |
om_password=some-password | |
om_target=https://1.2.3.4 | |
mkdir -p $HOME/tile-dl | |
cd $HOME/tile-dl | |
function aws { | |
if ! docker inspect aws-config > /dev/null 2>&1; then | |
docker run -it --name aws-config -v "$PWD:/pwd" mesosphere/aws-cli configure | |
fi | |
docker run -it --rm --volumes-from aws-config -v "$PWD:/pwd" mesosphere/aws-cli $@ | |
} | |
gsutil cp "gs://pks-tile-archive/$tile" ./ | |
if [ ! -f ./om ]; then | |
wget -q -O om https://github.com/pivotal-cf/om/releases/download/0.28.0/om-linux | |
chmod +x om | |
fi | |
./om --skip-ssl-validation -t "$om_target" -u "$om_username" -p "$om_password" upload-product -p "$tile" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment