move charts to charts dir

This commit is contained in:
ducoterra
2021-08-25 21:21:03 -04:00
parent ec636bada9
commit 1dcd5e0246
18 changed files with 7 additions and 8 deletions

1
.gitignore vendored
View File

@@ -3,4 +3,3 @@
*.srl *.srl
*.csr *.csr
users/ users/
charts/

View File

@@ -5,10 +5,10 @@
### Quickstart ### Quickstart
1. Start Docker 1. Start Docker
2. Run createuserspace.sh 2. Run createprojectspace.sh
```bash ```bash
./createuserspace.sh <username> <server_fqdn> ./createprojectspace.sh <server_fqdn> <username>
``` ```
### Update a user ### Update a user

View File

@@ -18,7 +18,7 @@ echo "No server supplied for user $USER"
exit 1 exit 1
fi fi
if [ $USER=="admin" ]; then if [ $USER = "admin" ]; then
echo "Creating admin user for server $SERVER" echo "Creating admin user for server $SERVER"
fi fi
@@ -33,7 +33,7 @@ fi
echo "Generating openssl cert" echo "Generating openssl cert"
docker run -it -v $CERT_DIR:/$USER python:latest openssl genrsa -out /$USER/$USER.key 2048 docker run -it -v $CERT_DIR:/$USER python:latest openssl genrsa -out /$USER/$USER.key 2048
if [ $USER=="admin" ]; then if [ $USER = "admin" ]; then
docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=system:masters" docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=system:masters"
else else
docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=user" docker run -it -v $CERT_DIR:/$USER python:latest openssl req -new -key /$USER/$USER.key -out /$USER/$USER.csr -subj "/CN=$USER/O=user"
@@ -86,7 +86,7 @@ echo "adding server to config with new context $SERVER-$USER"
kubectl config set-cluster $SERVER --server=https://$SERVER:6443 --certificate-authority=$CA_CERT_DIR/server-ca.pem kubectl config set-cluster $SERVER --server=https://$SERVER:6443 --certificate-authority=$CA_CERT_DIR/server-ca.pem
kubectl config set-credentials $USER-$SERVER --client-certificate=$CERT_DIR/$USER.crt --client-key=$CERT_DIR/$USER.key kubectl config set-credentials $USER-$SERVER --client-certificate=$CERT_DIR/$USER.crt --client-key=$CERT_DIR/$USER.key
if [ $USER=="admin" ]; then if [ $USER = "admin" ]; then
kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=kube-system --user=$USER-$SERVER kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=kube-system --user=$USER-$SERVER
else else
kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=$USER --user=$USER-$SERVER kubectl config set-context $SERVER-$USER --cluster=$SERVER --namespace=$USER --user=$USER-$SERVER
@@ -94,7 +94,7 @@ fi
kubectl config set current-context $SERVER-$USER kubectl config set current-context $SERVER-$USER
if [ $USER=="admin" ]; then if [ $USER = "admin" ]; then
echo "Admin user created, skipping namespace" echo "Admin user created, skipping namespace"
exit 0 exit 0
fi fi
@@ -113,4 +113,4 @@ ssh $SERVER "kubectl apply -f $SERVER_USER_DIR/namespace.yaml"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Failed to create namespace" echo "Failed to create namespace"
exit 1 exit 1
fi fi