Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7acad9c
Create main.sh
Dimokus88 Jul 18, 2023
6cf486e
Update main.sh
Dimokus88 Jul 18, 2023
c205569
Create deploy.yml
Dimokus88 Jul 18, 2023
3a0aa14
Update deploy.yml
Dimokus88 Jul 18, 2023
6b6f406
Update main.sh
Dimokus88 Jul 18, 2023
82c386d
Update main.sh
Dimokus88 Jul 18, 2023
99e7729
Update main.sh
Dimokus88 Jul 18, 2023
f3a3b85
Update main.sh
Dimokus88 Jul 18, 2023
e3f7661
Update main.sh
Dimokus88 Jul 18, 2023
e602661
Update main.sh
Dimokus88 Jul 18, 2023
0a47b35
Update main.sh
Dimokus88 Jul 18, 2023
0787fe0
Update main.sh
Dimokus88 Jul 18, 2023
e01d120
Update main.sh
Dimokus88 Jul 18, 2023
2a54add
Update main.sh
Dimokus88 Jul 18, 2023
b22e424
Update main.sh
Dimokus88 Jul 18, 2023
9b95480
Update main.sh
Dimokus88 Jul 18, 2023
521f44a
Update main.sh
Dimokus88 Jul 18, 2023
7e85722
Create README.md
Dimokus88 Jul 18, 2023
92797e6
Update deploy.yml
Dimokus88 Jul 18, 2023
8ce8f0c
Update deploy.yml
Dimokus88 Jul 18, 2023
7f32678
Update main.sh
Dimokus88 Jul 19, 2023
50b4c92
Update main.sh
Dimokus88 Jul 19, 2023
feb1bbf
Update deploy.yml
Dimokus88 Jul 19, 2023
d73b7fa
Update main.sh
Dimokus88 Jul 19, 2023
2dc0b8a
Update main.sh
Dimokus88 Jul 19, 2023
080a52c
Update main.sh
Dimokus88 Jul 20, 2023
cc84ed1
Update main.sh
Dimokus88 Jul 20, 2023
31276c2
Update main.sh
Dimokus88 Jul 20, 2023
452c55d
Update main.sh
Dimokus88 Jul 20, 2023
c8ff063
Update main.sh
Dimokus88 Jul 20, 2023
b7a6645
Update main.sh
Dimokus88 Jul 20, 2023
a7b9d0b
Update main.sh
Dimokus88 Jul 20, 2023
5a04c8c
Update main.sh
Dimokus88 Jul 20, 2023
cd3c3c1
Update main.sh
Dimokus88 Jul 20, 2023
4a6e5f5
Update main.sh
Dimokus88 Jul 20, 2023
6e3262b
Update main.sh
Dimokus88 Jul 20, 2023
ef47245
Update main.sh
Dimokus88 Jul 20, 2023
8c5ca6c
Update deploy.yml
Dimokus88 Jul 20, 2023
0833ece
Update README.md
Dimokus88 Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions AkashNetwork/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Deploy Restake on Akash Network

> [Short guides](https://github.com/DecloudNodesLab/Guides) about deploying on [Akash Network](https://akash.network/).

Copy [deploy.yml](/AkashNetwork/deploy.yml) and insert to [Cloudmos](https://deploy.cloudmos.io/).

#### Available variables: </br>
`SSH_PASS` - for activate ssh connection. </br>
`MNEMONIC` - passing phrase mnemonic to container explicitly, without encryption. </br>
`MNEMONIC_BASE64` - passing the phrase mnemonic to the container, as a BASE64 encrypted string. </br>
`NETWORK_JSON_LINK` - A RAW (or direct) link to your networks.json file, by default the repository's [networks.json](/src/networks.json) is used. </br>
`NETWORK_LOCAL_JSON_LINK` - A RAW (or direct) link to your networks.local.json file </br>
`CRONTAB` - the frequency of jobs in crontab, for example, to run every day at **21:00**, you should use `0 21 * * *`</br>
`RUN_ARG`- fill in if you want to run only selected chains, for example `"RUN_ARG=akash osmosis"`</br>

#### Example:
![image](https://github.com/Dimokus88/restake/assets/23629420/d45d290b-a4b4-496b-b43b-b04169e250c9)

**Use Akash Network! =)**
46 changes: 46 additions & 0 deletions AkashNetwork/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
version: "2.0"
services:
app:
image: ubuntu:20.04
env:
- "SSH_PASS="
- "MNEMONIC="
- "MNEMONIC_BASE64="
- "NETWORK_JSON_LINK="
- "NETWORK_LOCAL_JSON_LINK="
- "CRONTAB=0 21 * * *"
- "RUN_ARG="
command:
- "bash"
- "-c"
args:
- 'apt-get update ;
apt-get upgrade -y ;
apt-get install -y curl; curl -s https://raw.githubusercontent.com/eco-stake/restake/master/AkashNetwork/main.sh | bash '
expose:
- port: 22
as: 22
to:
- global: true
profiles:
compute:
app:
resources:
cpu:
units: 1
memory:
size: 512Mi
storage:
size: 1Gi
placement:
akash:
pricing:
app:
denom: uakt
amount: 10000
deployment:
app:
akash:
profile: app
count: 1
27 changes: 27 additions & 0 deletions AkashNetwork/main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# Telegram @Dimokus
# Discord Dimokus_
# 2023
TZ=Europe/London && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt install -y nano wget build-essential git make gcc nvme-cli ssh cron
export EDITOR=nano
curl -sL https://deb.nodesource.com/setup_18.x -o /tmp/nodesource_setup.sh
chmod +x /tmp/nodesource_setup.sh
/tmp/nodesource_setup.sh
apt install nodejs -y
node --version
npm --version
if [[ -n $SSH_PASS ]] ; then apt install -y ssh; echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && (echo ${SSH_PASS}; echo ${SSH_PASS}) | passwd root && service ssh restart; fi
git clone https://github.com/eco-stake/restake
cd restake
npm install
if [[ -n $MNEMONIC ]]; then echo MNEMONIC="$MNEMONIC" > .env; fi
if [[ -n $MNEMONIC_BASE64 ]]; then echo MNEMONIC=`echo "$MNEMONIC_BASE64" | base64 -d` > .env; fi
if [[ -n $NETWORK_JSON_LINK ]]; then wget -O /restake/src/networks.json $NETWORK_JSON_LINK;fi
if [[ -n $NETWORK_LOCAL_JSON_LINK ]]; then wget -O /restake/src/networks.local.json $NETWORK_LOCAL_JSON_LINK; fi
npm run autostake $RUN_ARG
crontab -l > current_cron
echo "$CRONTAB /bin/bash -c 'cd /restake && npm run autostake $RUN_ARG' > /restake/restake.log 2>&1" >> ~/current_cron
crontab -l | cat - ~/current_cron | crontab -
service cron start
sleep infinity