@ethernity-cloud/sdk-js 1.7.8 → 1.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +0,0 @@
1
- #!/bin/bash
2
- source ./.env
3
-
4
- echo "Building $VERSION"
5
-
6
- cd $VERSION/build
7
-
8
- docker login registry.scontain.com:5050 -u ${SCONTAIN_LOGIN} -p ${SCONTAIN_PASS}
9
-
10
- docker stop $(docker ps -q)
11
- docker rm $(docker ps -q) -f
12
- docker rmi $(docker images -q) -f
13
- docker system prune -f
14
-
15
- docker pull registry:2
16
- docker run -d --restart=always -p 5000:5000 --name registry registry:2
17
- docker build -t etny-nodenithy:latest .
18
- docker tag etny-nodenithy localhost:5000/etny-nodenithy
19
- docker push localhost:5000/etny-nodenithy
20
-
21
- cd las
22
- docker build -t etny-las .
23
- docker tag etny-las localhost:5000/etny-las
24
- docker push localhost:5000/etny-las
25
-
26
- cd ..
27
- docker cp ../../scripts/build-ipfs-upload.sh registry:/
28
- docker cp ../../scripts/ipfs-daemon.sh registry:/
29
-
30
- HASH=`docker exec -it registry /build-ipfs-upload.sh | grep "HASH is" | awk '{print $3}' | tr -d '\r'`
31
-
32
- echo Following hash was pinned: ${HASH}
33
-
34
- git pull
35
- cd ../..
36
- touch hashes/${HASH}
37
- git add hashes/*
38
-
39
- git commit -a -m "Added hash ${HASH}"
40
- git push
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
-
3
- while [ 1 == 1 ]
4
- do
5
- /go-ipfs/ipfs daemon
6
- sleep 5
7
- done
@@ -1,50 +0,0 @@
1
- #!/bin/bash
2
-
3
- source ./.env
4
-
5
- apt-get install -y screen
6
- cd ${VERSION}/run
7
-
8
-
9
- wget https://github.com/ipfs/kubo/releases/download/v0.17.0/kubo_v0.17.0_linux-386.tar.gz
10
- tar zxvf kubo_v0.17.0_linux-386.tar.gz
11
- rm -rf kubo_v0.17.0_linux-386.tar.gz
12
-
13
- mv kubo go-ipfs
14
- cd go-ipfs
15
- ./ipfs init
16
-
17
- screen -dm -t ipfs-daemon ./ipfs daemon
18
- screen -dm -t ipfs-swarm watch ./ipfs swarm connect /ip4/31.7.188.59/tcp/4001/p2p/QmRBc1eBt4hpJQUqHqn6eA8ixQPD3LFcUDsn6coKBQtia5
19
-
20
- cd ..
21
- go-ipfs/ipfs get ${TEMPLATE}
22
-
23
- docker-compose down
24
- docker stop registry
25
- docker rm registry
26
- docker rmi localhost:5000/etny-nodenithy
27
- docker rmi localhost:5000/etny-las
28
- docker system prune -f
29
- docker run -d --restart=always -p 5000:5000 --name registry -v ./${TEMPLATE}:/var/lib/registry registry:2
30
-
31
- killall -9 screen
32
- rm -rf go-ipfs
33
-
34
- sleep 10
35
-
36
- MRENCLAVE=`docker-compose run -e SCONE_LOG=INFO -e SCONE_HASH=1 etny-nodenithy | grep -v Creating | grep -v Pulling | grep -v latest | grep -v Digest | tr -d '\r'`
37
- PREDECESSOR=`cat predecessor.json | grep hash | awk -F '"' '{print $4}'`
38
-
39
- cat etny-nodenithy-test-0.0.2.yaml.tpl | sed s/"__PREDECESSOR__"/${PREDECESSOR}/ | sed s/"__MRENCLAVE__"/${MRENCLAVE}/ > etny-nodenithy-test-0.0.2.yaml
40
-
41
- curl -k -s --cert certs/cert.pem --key certs/key.pem --data-binary @etny-nodenithy-test-0.0.2.yaml -X POST https://scone-cas.cf:8081/session -v -o predecessor.json
42
-
43
-
44
- git commit -a -m "Updated for MRENCLAVE: ${MRENCLAVE}"
45
- git push
46
-
47
- docker-compose up -d las
48
- docker-compose up etny-nodenithy
49
-
50
-
@@ -1,22 +0,0 @@
1
- #!/bin/sh
2
-
3
- apk add git
4
-
5
- ls -la
6
-
7
- echo "${REGISTRY_PATH}"
8
- cd ${REGISTRY_PATH}
9
-
10
- ls -la
11
-
12
- #commit add all to git
13
- ls -la ${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/
14
- echo "Adding changed files to GIT: IPFS_HASH, IPFS_DOCKER_COMPOSE_HASH, CERTIFICATE..."
15
- git -C ${CI_PROJECT_DIR}/etny-hash-packages add etny-pynithy/v3/.
16
- echo "Committed all files"
17
- git -C ${CI_PROJECT_DIR}/etny-hash-packages commit -m 'Adding changed files to GIT: IPFS_HASH, IPFS_DOCKER_COMPOSE_HASH, CERTIFICATE'
18
- echo "Pushed all files"
19
- git -C ${CI_PROJECT_DIR}/etny-hash-packages push
20
- echo "Added and committed all files"
21
- cd -
22
-
@@ -1,89 +0,0 @@
1
- #!/bin/sh
2
-
3
- apk add wget tar git screen
4
-
5
- export IPFS_HOME=${PWD}/ipfs
6
- export IPFS_PATH=${IPFS_HOME}/.ipfs
7
-
8
- export KUBO_URL="https://github.com/ipfs/kubo/releases/download/v0.17.0/kubo_v0.17.0_linux-386.tar.gz"
9
- echo KUBO_URL=${KUBO_URL}
10
-
11
- echo "git clone https://ci:${CI_ACCESS_TOKEN}@gitlab.ethernity.cloud/etny-node/etny-hash-packages.git ${CI_PROJECT_DIR}/etny-hash-packages"
12
- git clone https://ci:${CI_ACCESS_TOKEN}@gitlab.ethernity.cloud/etny-node/etny-hash-packages.git ${CI_PROJECT_DIR}/etny-hash-packages
13
-
14
- git -C ${CI_PROJECT_DIR}/etny-hash-packages config --local user.email "ci@ethernity.cloud"
15
- git -C ${CI_PROJECT_DIR}/etny-hash-packages config --local user.name "CI/CD"
16
-
17
- mkdir -p ${IPFS_HOME}
18
-
19
- wget -qO- ${KUBO_URL} | tar xvz
20
-
21
- # wget -qO- ${KUBO_URL} | tar xvz
22
-
23
- echo "*** KUBO Downloaded ***"
24
-
25
- if [ -d "${IPFS_PATH}" ]; then
26
- killall ipfs
27
- rm -fr ${IPFS_PATH}
28
- fi
29
-
30
- export IPFS_CMD=${PWD}/kubo/ipfs
31
-
32
- ${IPFS_CMD} init
33
-
34
- sleep 20
35
-
36
- ${IPFS_CMD} daemon &
37
-
38
- sleep 20
39
-
40
- ${IPFS_CMD} swarm connect /ip4/31.7.188.59/tcp/4001/ipfs/QmRBc1eBt4hpJQUqHqn6eA8ixQPD3LFcUDsn6coKBQtia5
41
- ${IPFS_CMD} bootstrap add /ip4/31.7.188.59/tcp/4001/ipfs/QmRBc1eBt4hpJQUqHqn6eA8ixQPD3LFcUDsn6coKBQtia5
42
-
43
- #ADDING DOCKER COMPOSE hash
44
- export IPFS_DOCKER_COMPOSE_HASH=`${IPFS_CMD} add docker-compose-final.yml | grep added | tail -1 | awk '{print $2}'`
45
- echo "IPFS_DOCKER_COMPOSE_HASH=${IPFS_DOCKER_COMPOSE_HASH}"
46
-
47
- cp certificate.securelock.crt "${REGISTRY_PATH}/certificate.securelock.crt"
48
- cp certificate.trustedzone.crt "${REGISTRY_PATH}/certificate.trustedzone.crt"
49
- echo "${REGISTRY_PATH}"
50
- cd ${REGISTRY_PATH}
51
-
52
- echo ipfs pin add --progress ${IPFS_DOCKER_COMPOSE_HASH}
53
- ${IPFS_CMD} pin add --progress ${IPFS_DOCKER_COMPOSE_HASH}
54
-
55
- #ADDING DOCKER IMAGE hash
56
- export IPFS_HASH=`${IPFS_CMD} add . -r | grep added | tail -1 | awk '{print $2}'`
57
- echo "IPFS_HASH=${IPFS_HASH}"
58
-
59
- echo ipfs pin add --progress ${IPFS_HASH}
60
- ${IPFS_CMD} pin add --progress ${IPFS_HASH}
61
-
62
- #DOWNLOADING DOCKER COMPOSE FROM IFPS HASH
63
- echo ipfs get ${IPFS_DOCKER_COMPOSE_HASH}
64
- ${IPFS_CMD} get ${IPFS_DOCKER_COMPOSE_HASH}
65
-
66
- #DOWNLOADING DOCKER IMAGE FROM IFPS HASH
67
- echo ipfs get ${IPFS_HASH}
68
- ${IPFS_CMD} get ${IPFS_HASH}
69
-
70
-
71
- #ADD DOCKER IMAGE to GIT
72
- echo touch ${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/${IPFS_HASH}
73
- touch ${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/${IPFS_HASH}
74
-
75
- #Add DOCKER COMPOSE to GIT
76
- echo touch ${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/docker/${IPFS_DOCKER_COMPOSE_HASH}
77
- touch ${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/docker/${IPFS_DOCKER_COMPOSE_HASH}
78
-
79
- #ADDING CERTIFICATE TO GIT
80
- mv certificate.securelock.crt "${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/cert/securelock/${IPFS_HASH}.crt"
81
- cat "${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/cert/securelock/${IPFS_HASH}.crt"
82
-
83
- mv certificate.trustedzone.crt "${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/cert/trustedzone/${IPFS_HASH}.crt"
84
- cat "${CI_PROJECT_DIR}/etny-hash-packages/etny-pynithy/v3/cert/trustedzone/${IPFS_HASH}.crt"
85
-
86
- cd -
87
-
88
- echo "${IPFS_HASH}" > "IPFS_HASH.ipfs"
89
- echo "${IPFS_DOCKER_COMPOSE_HASH}" > "IPFS_DOCKER_COMPOSE_HASH.ipfs"