-
Notifications
You must be signed in to change notification settings - Fork 4
/
manifest.yaml
74 lines (64 loc) · 2.5 KB
/
manifest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
type: install
version: 1.4
id: iota
name: IOTA Node
baseUrl: https://raw.githubusercontent.com/jelastic-jps/iota-node/main
logo: images/iota-logo-black.png
homepage: https://www.iota.org/
description:
short: IOTA’s Tangle is an open, feeless and scalable distributed ledger.
text: |
IOTA’s Tangle is an open, feeless and scalable distributed ledger, designed to support frictionless data and value transfer.
categories:
- apps/microservices
globals:
user: admin
password: ${fn.password}
nodes:
- cloudlets: 24 #1 cloudlet = 128MiB + 400MHz
nodeType: dockerengine
nodeGroup: cp
extip: true
settings:
fields:
- name: network
type: radiolist
caption: Connect to Network
values:
mainnet: MainNet
testnet: TestNet
shimmer: Shimmer
hideLabel: false
default: mainnet
onInstall:
- setupNode
- runNode
actions:
setupNode:
- cmd[cp]: |-
mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/iota | tar -zx
mkdir /app && wget ${baseUrl}/tools/passwd-tool -O /app/passwd-tool
chmod +x /app/passwd-tool
wget ${baseUrl}/templates/docker-compose-custom.yml -O docker-compose-custom.yml
salt=$(openssl rand -hex 32)
pHash=$(/app/passwd-tool ${globals.password} $salt | tail -n1 | awk -F ': ' '{print $2}')
[ -z "$pHash" ] && { echo "Could not generate hash" ;exit 1; };
cp env_template .env
sed -i 's|#DASHBOARD_PASSWORD=.*|DASHBOARD_PASSWORD='${pHash}'|g' .env
sed -i 's|#DASHBOARD_SALT=.*|DASHBOARD_SALT='${salt}'|g' .env
sed -i 's|#DASHBOARD_USERNAME=.*|DASHBOARD_USERNAME=admin|g' .env
sed -i 's/#NODE_HOST=[0-9]\+.[0-9]\+.[0-9]\+.[0-9]\+/NODE_HOST=${nodes.cp.extips[0]}/g' .env
sed -i 's|#NODE_HOST=node.*|NODE_HOST=${env.domain}|g' .env
sed -i 's|#ACME_EMAIL=.*|ACME_EMAIL=${user.email}|g' .env
sed -i 's|#COMPOSE_FILE=.*|COMPOSE_FILE=docker-compose.yml:docker-compose-https.yml:docker-compose-custom.yml|g' .env
sed -i 's|#HORNET_CONFIG_FILE=config_${settings.network}.json|HORNET_CONFIG_FILE=config_${settings.network}.json|g' .env
./prepare_docker.sh
runNode:
- cmd[cp]: |-
cd node-docker-setup
docker-compose build
docker-compose up -d
success: |-
**Dashboard**: [https://${env.domain}/dashboard/login](https://${env.domain}/dashboard/login)
**Username** : ${globals.user}
**Password** : ${globals.password}