Compare commits

..

7 Commits

Author SHA1 Message Date
9b69908890 tweaks 2024-04-08 12:53:07 -03:00
c9678a7244 whatever 2023-07-18 10:40:02 -03:00
2be86e238f Fix readme 2022-12-14 10:29:28 -03:00
a50214f468 Do not start this automatically 2022-07-21 18:27:22 -03:00
8b890ba35f 2 cpus 2022-07-20 09:34:58 -03:00
5163598319 Use pass for secret management 2022-07-19 05:49:10 -03:00
881b698966 working state 2022-07-16 16:57:11 -03:00
4 changed files with 19 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ by the VM sandbox.
Assuming you have ignite and faas-cli installed: Assuming you have ignite and faas-cli installed:
* replace `id_rsa.pub` with yours * replace `id_rsa.pub` with yours
* run setup.sh * run build.sh
You will end up with: You will end up with:

View File

@@ -9,7 +9,7 @@ waitport() {
} }
sudo ignite create weaveworks/ignite-ubuntu \ sudo ignite create weaveworks/ignite-ubuntu \
--cpus 1 \ --cpus 2 \
--memory 1GB \ --memory 1GB \
--size 10GB \ --size 10GB \
--ssh=id_rsa.pub \ --ssh=id_rsa.pub \
@@ -21,7 +21,9 @@ sudo ignite vm start $NAME
IP=$(sudo ignite vm ls | grep faas | cut -f9 -d\ ) IP=$(sudo ignite vm ls | grep faas | cut -f9 -d\ )
waitport $IP 22 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 ssh root@$IP sh setup.sh
# Login # Login
@@ -30,5 +32,8 @@ ssh root@$IP cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login --p
# Setup test function # Setup test function
faas-cli store deploy figlet 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 echo 'Success!' | faas-cli invoke figlet

0
down Normal file
View File

11
setup.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/sh -x
set -e
apt update
apt upgrade -y
apt install -y git
apt clean -y
rm -rf faasd
git clone https://github.com/openfaas/faasd --depth 1
cd faasd
./hack/install.sh