hscloud/env.sh

30 lines
660 B
Bash

# source me to have all the nice things
if [ "$0" == "$BASH_SOURCE" ]; then
echo "You should be sourcing this."
exit 1
fi
hscloud_root="$( cd "$(dirname "$BASH_SOURCE")"; pwd -P )"
hscloud-dc() {
( cd "$hscloud_root" && docker-compose -f "docker/docker-compose.yml" "$@" )
}
hscloud-pki-dev() {
(
set -e
cd "$hscloud_root"
rm -rf docker/pki
cp -rv go/pki/dev-certs docker/pki
cd docker/pki
bash gen.sh m6220-proxy arista-proxy cmc-proxy topo client
ls *pem
)
}
echo "Now playing:"
echo " hscloud-dc - run docker-compose"
echo " hscloud-pki-dev - generate dev PKI certs"