| 1 |
#!/bin/sh |
| 2 |
cd $AUTOPKGTEST_TMP |
| 3 |
echo "create certificate authority" |
| 4 |
nebula-cert ca -name "Autopkgtest CA" |
| 5 |
echo "create and sign node certificate" |
| 6 |
nebula-cert sign -ca-key ca.key -ca-crt ca.crt -name "Autopkgtest Node" -ip "127.0.0.1/0" -out-crt node.crt -out-key node.key |
| 7 |
echo "create node config" |
| 8 |
cat <<EOF > node.yaml |
| 9 |
pki: |
| 10 |
ca: ca.crt |
| 11 |
cert: node.crt |
| 12 |
key: node.key |
| 13 |
static_host_map: |
| 14 |
"127.0.0.1": ["localhost:4242"] |
| 15 |
lighthouse: |
| 16 |
interval: 60 |
| 17 |
am_lighthouse: false |
| 18 |
listen: |
| 19 |
host: 0.0.0.0 |
| 20 |
port: 4242 |
| 21 |
EOF |
| 22 |
echo "test configuration" |
| 23 |
nebula -test -config node.yaml |
| 24 |
cp $AUTOPKGTEST_TMP/*.key $AUTOPKGTEST_TMP/*.crt $AUTOPKGTEST_ARTIFACTS/ |