Compare commits
7 Commits
7a4947b22e
...
main
Author | SHA1 | Date | |
---|---|---|---|
9b69908890 | |||
c9678a7244 | |||
2be86e238f | |||
a50214f468 | |||
8b890ba35f | |||
5163598319 | |||
881b698966 |
@@ -20,7 +20,7 @@ by the VM sandbox.
|
||||
|
||||
Assuming you have ignite and faas-cli installed:
|
||||
* replace `id_rsa.pub` with yours
|
||||
* run setup.sh
|
||||
* run build.sh
|
||||
|
||||
You will end up with:
|
||||
|
||||
|
9
build.sh
9
build.sh
@@ -9,7 +9,7 @@ waitport() {
|
||||
}
|
||||
|
||||
sudo ignite create weaveworks/ignite-ubuntu \
|
||||
--cpus 1 \
|
||||
--cpus 2 \
|
||||
--memory 1GB \
|
||||
--size 10GB \
|
||||
--ssh=id_rsa.pub \
|
||||
@@ -21,7 +21,9 @@ sudo ignite vm start $NAME
|
||||
IP=$(sudo ignite vm ls | grep faas | cut -f9 -d\ )
|
||||
waitport $IP 22
|
||||
|
||||
scp -o "StrictHostKeyChecking no" setup.sh root@$IP:
|
||||
ssh -o "StrictHostKeyChecking no" root@$IP mkdir -p /var/lib/faasd/secrets
|
||||
ssh root@$IP "echo $(pass faas.ralsina.me) > /var/lib/faasd/secrets/basic-auth-password"
|
||||
scp setup.sh root@$IP:
|
||||
ssh root@$IP sh setup.sh
|
||||
|
||||
# Login
|
||||
@@ -30,5 +32,8 @@ ssh root@$IP cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login --p
|
||||
|
||||
# Setup test function
|
||||
faas-cli store deploy figlet
|
||||
pass iol-user | faas-cli secret create iol-user
|
||||
pass iol-pass | faas-cli secret create iol-pass
|
||||
pass iol-api-secret | faas-cli secret create iol-api-secret
|
||||
|
||||
echo 'Success!' | faas-cli invoke figlet
|
||||
|
Reference in New Issue
Block a user