How to set up the aragon CLI on digital ocean - VahanamOrganization/vahanam-supply-chain GitHub Wiki
The example is working on Digital Ocean droplet with Ubuntu 18.04.3(LTS)x64
Initial set up: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04
First log in with ssh to the server:
ssh root@your_server_ip
we have to set up a non-root user:
- adduser sammy
- usermod -aG sudo sammy
Then set up the firewall: Source: https://www.configserverfirewall.com/ufw-ubuntu-firewall/ubuntu-firewall-open-port/
- ufw allow OpenSSH
- ufw allow 5001/tcp
- ufw allow 8080/tcp
- ufw allow 4001/tcp
- ufw enable
- ufw status
Enabling External Access for Your Regular User:
If the Root Account Uses SSH Key Authentication:
- rsync --archive --chown=sammy:sammy ~/.ssh /home/sammy
Install the Node: Source link https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04
- curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh -o install_nvm.sh
Inspect the installation script with nano:
- nano install_nvm.sh
Run the script with bash:
- bash install_nvm.sh
To gain access to the nvm functionality, you’ll need to either log out and log back in again or source the ~/.profile file so that your current session knows about the changes:
- source ~/.profile
With nvm installed, you can install isolated Node.js versions. For information about the versions of Node.js that are available, type:
- nvm ls-remote
You want to select the version v12.18.2
- nvm install v12.18.2
Check the version:
- node -v
Install other dependencies:
- sudo apt install git
- sudo apt install python
- sudo apt install make
- sudo apt install g++
Then install aragon-cli: Source: https://hack.aragon.org/docs/cli-intro.html
- npm install -g @aragon/cli
Install the missing package:
- npm install -g eth-json-rpc-filters
And then run the aragon command to check if everything is working.
Then you have to install IPFS:
- aragon ipfs install
When working with aragon you have to run the ipfs first:
- aragon ipfs start
To check if everything is running
- aragon ipfs status
To set up a DAO on rinkeby ( this will create a dao with bare-template )
- dao new --environment aragon:rinkeby
DAO address: 0x98D70266FE0FB60CD5c9F591df87B0B146dEB4d2
Set up a bash vaiable like this:
- DAO=0x98D70266FE0FB60CD5c9F591df87B0B146dEB4d2
Setup a token manager
Deploy a minime token
- dao token new "Admin" "ADM" 0 --environment aragon:rinkeby
Set the address of the token to:
- minime=0x0Ab9a3b2Eca92132f6F399D0d7b4326D0b77f0Cc
Install a token manager
- dao install $DAO token-manager --app-init none --environment aragon:rinkeby
Check your list of apps to verify the new Token Manager proxy address
- dao apps $DAO --all --environment aragon:rinkeby
Set up variable for Token Manager
- tokens=0x1456eBD341446D091A02158B547Cc271B1AB6A15
Next we want to set the token-manager instances as the token-controller on our token.
- dao token change-controller $minime $tokens --environment aragon:rinkeby
Set up my eth address
- me=0x087EFF8739a31891bcbAA9D07Ed9619D9d820B73
Initialize first permission (replace the addresses)
- dao acl create $DAO $tokens MINT_ROLE $me $me --environment aragon:rinkeby
Successfully executed: “Initialize Token Manager for ADM, whose tokens are not transferable and limited to a maximum of 1 per account”
Initialize the Token Manager
- dao exec $DAO $tokens initialize $minime false 1 --environment aragon:rinkeby
Congrats Successfully executed: "Initialize Token Manager for ADM, whose tokens are not transferable and limited to a maximum of 1 per account"