121 lines
3.5 KiB
Bash
Executable File
121 lines
3.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
GET() {
|
|
curl -Lk -XGET ${ENDPOINT}${1}
|
|
}
|
|
PUT() {
|
|
curl -Lk -XPUT -u "${AUTH_USER}:${AUTH_PASS}" ${ENDPOINT}${1} --data "${2}" -H 'Content-type: application/json'
|
|
}
|
|
POST() {
|
|
curl -Lk -XPOST -u "${AUTH_USER}:${AUTH_PASS}" ${ENDPOINT}${1} --data "${2}" -H 'Content-type: application/json'
|
|
}
|
|
DELETE() {
|
|
curl -Lk -XDELETE -u "${AUTH_USER}:${AUTH_PASS}" ${ENDPOINT}${1}
|
|
}
|
|
|
|
ENDPOINT=$1 ; shift
|
|
AUTH_USER=$1 ; shift
|
|
AUTH_PASS=$1 ; shift
|
|
if [[ -z $ENDPOINT || -z $AUTH_USER || -z $AUTH_PASS || -n $1 ]]; then
|
|
echo >&2 "USAGE: $0 <url> <user> <pass>"
|
|
exit 1
|
|
fi
|
|
|
|
for stemcell in \
|
|
bosh-aws-xen-hvm-ubuntu-trusty-go_agent \
|
|
bosh-aws-xen-ubuntu-trusty-go_agent \
|
|
bosh-azure-hyperv-ubuntu-trusty-go_agent \
|
|
bosh-openstack-kvm-ubuntu-trusty-go_agent \
|
|
bosh-openstack-kvm-ubuntu-trusty-go_agent-raw \
|
|
bosh-vcloud-esxi-ubuntu-trusty-go_agent \
|
|
bosh-vsphere-esxi-ubuntu-trusty-go_agent \
|
|
bosh-vsphere-esxi-centos-7-go_agent \
|
|
bosh-warden-boshlite-ubuntu-trusty-go_agent \
|
|
bosh-google-kvm-ubuntu-trusty-go_agent
|
|
do
|
|
POST '/v1/stemcell' '{"name":"'${stemcell}'","url":"https://bosh.io/d/stemcells/'${stemcell}'?v={{version}}"}'
|
|
done
|
|
|
|
for cpi in aws azure openstack rackhd softlayer vcloud vsphere google
|
|
do
|
|
POST '/v1/release' '{"name":"bosh-'${cpi}'-cpi","url":"https://bosh.io/d/github.com/cloudfoundry-incubator/bosh-'${cpi}'-cpi-release?v={{version}}"}'
|
|
done
|
|
|
|
for release in \
|
|
bind9 \
|
|
cf-subway consul \
|
|
docker-registry \
|
|
jumpbox \
|
|
route-registrar \
|
|
shell \
|
|
toolbelt \
|
|
vault \
|
|
prometheus \
|
|
sawmill \
|
|
simple-remote-syslog \
|
|
slack-notification-resource \
|
|
logsearch \
|
|
stannis
|
|
do
|
|
POST '/v1/release' '{"name":"'${release}'","url":"https://bosh.io/d/github.com/cloudfoundry-community/'${release}'-boshrelease?v={{version}}"}'
|
|
done
|
|
|
|
for r in \
|
|
cf:cloudfoundry/cf-release \
|
|
cf-mysql:cloudfoundry/cf-mysql-release \
|
|
bosh:cloudfoundry/bosh \
|
|
syslog:cloudfoundry/syslog-release \
|
|
uaa:cloudfoundry/uaa-release \
|
|
cf-rabbitmq:pivotal-cf/cf-rabbitmq-release \
|
|
cf-redis:pivotal-cf/cf-redis-release \
|
|
diego:cloudfoundry/diego-release \
|
|
etcd:cloudfoundry-incubator/etcd-release \
|
|
garden-linux:cloudfoundry/garden-linux-release \
|
|
garden-runc:cloudfoundry/garden-runc-release \
|
|
concourse:concourse/concourse \
|
|
bosh-warden-cpi:cppforlife/bosh-warden-cpi-release \
|
|
nxlog:hybris/nxlog-boshrelease \
|
|
openvpn:dpb587/openvpn-bosh-release \
|
|
influxdb:vito/influxdb-boshrelease \
|
|
logsearch-for-cloudfoundry:cloudfoundry-community/logsearch-for-cloudfoundry \
|
|
grafana:vito/grafana-boshrelease \
|
|
nfs-volume:cloudfoundry-incubator/nfs-volume-release
|
|
do
|
|
name=$(echo ${r} | cut -d ":" -f1)
|
|
release=$(echo ${r} | cut -d ":" -f2)
|
|
POST '/v1/release' '{"name":"'${name}'","url":"https://bosh.io/d/github.com/'${release}'?v={{version}}"}'
|
|
done
|
|
|
|
for release in \
|
|
shield
|
|
do
|
|
POST '/v1/release' '{"name":"'${release}'","url":"https://bosh.io/d/github.com/starkandwayne/'${release}'-boshrelease?v={{version}}"}'
|
|
done
|
|
|
|
for release in \
|
|
bolo \
|
|
node-exporter \
|
|
postgres \
|
|
port-forwarding \
|
|
strongswan \
|
|
netdata \
|
|
docker \
|
|
safe \
|
|
tmate \
|
|
locker
|
|
do
|
|
POST '/v1/release' '{"name":"'${release}'","url":"https://github.com/cloudfoundry-community/'${release}'-boshrelease/releases/download/v{{version}}/'${release}'-{{version}}.tgz"}'
|
|
done
|
|
|
|
for r in \
|
|
dingo-postgresql:dingotiles/dingo-postgresql-release \
|
|
nginx:cloudfoundry-community/nginx-release \
|
|
haproxy:cloudfoundry-incubator/haproxy
|
|
do
|
|
name=$(echo ${r} | cut -d ":" -f1)
|
|
repo=$(echo ${r} | cut -d ":" -f2)
|
|
POST '/v1/release' '{"name":"'${name}'","url":"https://github.com/'${repo}'/releases/download/v{{version}}/'${name}'-{{version}}.tgz"}'
|
|
done
|
|
|
|
echo "DONE"
|