Skip to content

Commit

Permalink
fix-demo: misc demo related fixes (#204)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Ng <[email protected]>
  • Loading branch information
mikeshng authored Oct 21, 2024
1 parent bb80909 commit 53551d4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
10 changes: 7 additions & 3 deletions hack/demo-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sudo microk8s.config > ~/.kube/config

What's left is to install the metallb configuration. You should be good now.

```
```shell
kubectl apply -n metallb-system -f hack/demo-env/resources/metallb-ipaddresspool.yaml
```

Expand All @@ -50,7 +50,7 @@ Make sure you have administrative access to a cluster and [vcluster](https://git

To setup all required virtual clusters, run

```
```shell
./hack/demo-env/setup-vcluster-env.sh create
```

Expand Down Expand Up @@ -78,7 +78,11 @@ This is a local development environment. It comes with pre-configured credential

You can authenticate to the the Argo CD UI or API server with user `admin` and password `adminadmin`. Creative, isn't it.

You will need to generate credentials for the agents. Run the `gen-creds.sh` script before you start any of the agent or principal components.
You will need to generate credentials for the agents. Before you start any of the agent or principal components run:

```shell
gen-creds.sh
```

## Starting the components

Expand Down
2 changes: 1 addition & 1 deletion hack/demo-env/setup-vcluster-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ create)
for c in $VCLUSTERS; do
cluster=$(cluster $c)
echo " --> Creating vcluster $cluster"
vcluster create --context=${initial_context} ${EXTRA_VCLUSTER_PARAMS} --switch-context=false -n vcluster-${cluster} --expose --kube-config-context-name vcluster-${cluster} vcluster-${cluster}
vcluster create --context=${initial_context} ${EXTRA_VCLUSTER_PARAMS} -n vcluster-${cluster} --expose --kube-config-context-name vcluster-${cluster} vcluster-${cluster}

# I found a sleep statement here was beneficial to allow time for the load balancer to become available. If we find this is not required, these commented out lines should be removed.
# if [[ "$OPENSHIFT" != "" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions hack/demo-env/start-agent-autonomous.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright 2024 The argocd-agent Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -e -o pipefail
set -ex -o pipefail
ARGS=$*
if ! kubectl config get-contexts | tail -n +2 | awk '{ print $2 }' | grep -qE '^vcluster-agent-autonomous$'; then
echo "kube context vcluster-agent-autonomous is not configured; missing setup?" >&2
Expand Down
2 changes: 1 addition & 1 deletion hack/demo-env/start-agent-managed.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright 2024 The argocd-agent Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion hack/demo-env/start-principal.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright 2024 The argocd-agent Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down

0 comments on commit 53551d4

Please sign in to comment.