Update docs and ssh-agent.sh usage and checks to ensure CLUSTER is specified

Change mycluster to cluster example usage

Minor refactors
This commit is contained in:
bennerv 2020-11-06 12:52:12 -05:00
Родитель 18a52b94e4
Коммит 0721d978e9
2 изменённых файлов: 15 добавлений и 10 удалений

Просмотреть файл

@ -12,7 +12,7 @@
package is called `python-virtualenv` on both Fedora and Debian-based
systems.
1. Fedora users: install the `gpgme-devel` and `libassuan-devel` packages.
1. Fedora users: install the `gpgme-devel`, `libassuan-devel`, and `openssl` packages.
Debian users: install the `libgpgme-dev` package.
@ -150,13 +150,13 @@
OR use the create utility:
```bash
CLUSTER=mycluster go run ./hack/cluster create
CLUSTER=cluster go run ./hack/cluster create
```
Later the cluster can be deleted as follows:
```bash
CLUSTER=mycluster go run ./hack/cluster delete
CLUSTER=cluster go run ./hack/cluster delete
```
[1]: https://docs.microsoft.com/en-us/azure/openshift/tutorial-create-cluster
@ -189,16 +189,16 @@
## Debugging
* SSH to the bootstrap node:
> __NOTE:__ If you have a password-based `sudo` command, you must first authenticate before running `sudo` in the background
```bash
sudo openvpn secrets/vpn-$LOCATION.ovpn &
hack/ssh-agent.sh bootstrap
CLUSTER=cluster hack/ssh-agent.sh bootstrap
```
* Get an admin kubeconfig:
```bash
make admin.kubeconfig
CLUSTER=cluster make admin.kubeconfig
export KUBECONFIG=admin.kubeconfig
```
@ -207,7 +207,7 @@
* First, get the admin kubeconfig and `export KUBECONFIG` as detailed above.
```bash
hack/ssh-agent.sh [master-{0,1,2}]
CLUSTER=cluster hack/ssh-agent.sh [master-{0,1,2}]
```

Просмотреть файл

@ -5,9 +5,9 @@
# you want to pass in
usage() {
echo "usage: $0 hostname_pattern" >&2
echo " Examples: $0 master1" >&2
echo " $0 bootstrap" >&2
echo "usage: CLUSTER=cluster $0 hostname_pattern" >&2
echo " Examples: CLUSTER=cluster $0 master1" >&2
echo " CLUSTER=cluster $0 bootstrap" >&2
exit 1
}
@ -24,6 +24,11 @@ trap cleanup EXIT
eval "$(ssh-agent | grep -v '^echo ')"
if [[ -z "$CLUSTER" ]]; then
echo "CLUSTER must be specified"
usage
fi
if [[ -z "$RESOURCEID" ]]; then
RESOURCEID="/subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${RESOURCEGROUP}/providers/Microsoft.RedHatOpenShift/openShiftClusters/${CLUSTER}"
fi