|
1 | 1 | # Travis
|
2 | 2 | [](https://travis-ci.org/CyberMiles/travis)
|
3 | 3 |
|
4 |
| -Please see the documentation for building and deploying Travis nodes here: https://travis.readthedocs.io/en/latest/getting-started.html |
5 |
| - |
6 |
| -## Automated Script - CyberMiles testnet |
7 |
| -Below is a bash script which will get Lity, libENI and a Travis node running on Ubuntu 16.04. Disclaimer: These instructions are for a brand-new disposable 16.04 Ubuntu test instance which has the sole purpose of running and testing the CyberMiles Lity compiler, CyberMiles libENI framework and the CyberMiles testnet called Travis. |
8 |
| - |
9 |
| -``` |
10 |
| -#/bin/bash |
11 |
| -
|
12 |
| -#Disclaimer: These instructions are for a brand-new disposable 16.04 Ubuntu test instance which has the sole purpose of running and testing the CyberMiles Lity compiler, CyberMiles libENI framework and the CyberMiles testnet called Travis. |
13 |
| -
|
14 |
| -#To use this file copy this text into a file called install_cybermiles.sh in your fresh disposable Ubuntu 16.04 machine's home directory. Make the file executable by running "sudo chmod a+x ~/install_cybermiles.sh" and then finally execute the file by running "cd ~" and then "./install_cybermiles.sh" |
15 |
| -
|
16 |
| -#System preparation Ubuntu 16.04 LTS |
17 |
| -cd ~ |
18 |
| -sudo apt-get -y update |
19 |
| -sudo apt-get -y upgrade |
20 |
| -sudo apt-get -y autoremove |
21 |
| -sudo apt-get -y install gcc |
22 |
| -sudo apt-get -y install git |
23 |
| -sudo apt-get -y install make |
24 |
| -sudo apt-get -y install curl |
25 |
| -sudo apt-get -y install wget |
26 |
| -sudo apt-get -y install cmake |
27 |
| -sudo apt-get -y install bison |
28 |
| -sudo apt-get -y install openssl |
29 |
| -sudo apt-get -y install binutils |
30 |
| -sudo apt-get -y install automake |
31 |
| -sudo apt-get -y install libssl-dev |
32 |
| -sudo apt-get -y install libboost-dev |
33 |
| -sudo apt-get -y install libaudit-dev |
34 |
| -sudo apt-get -y install libblkid-dev |
35 |
| -sudo apt-get -y install e2fslibs-dev |
36 |
| -sudo apt-get -y install build-essential |
37 |
| -sudo apt-get -y install libboost-all-dev |
38 |
| -
|
39 |
| -#Installing Lity |
40 |
| -cd ~ |
41 |
| -git clone https://github.com/CyberMiles/lity.git |
42 |
| -cd lity |
43 |
| -mkdir build |
44 |
| -cd build |
45 |
| -cmake .. |
46 |
| -make |
47 |
| -./lityc/lityc --help |
48 |
| -
|
49 |
| -#Installing SkyPat |
50 |
| -cd ~ |
51 |
| -wget https://github.com/skymizer/SkyPat/archive/v3.1.1.tar.gz |
52 |
| -tar -zxvf v3.1.1.tar.gz |
53 |
| -cd SkyPat-3.1.1 |
54 |
| -./autogen.sh |
55 |
| -./configure |
56 |
| -make |
57 |
| -sudo make install |
58 |
| -
|
59 |
| -#Installing Go |
60 |
| -cd ~ |
61 |
| -bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) |
62 |
| -source $HOME/.gvm/scripts/gvm |
63 |
| -gvm install go1.10.3 -B |
64 |
| -gvm use go1.10.3 --default |
65 |
| -echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc |
66 |
| -echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc |
67 |
| -echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc |
68 |
| -source ~/.bashrc |
69 |
| -
|
70 |
| -#Installing Travis |
71 |
| -go get github.com/CyberMiles/travis |
72 |
| -
|
73 |
| -#PLEASE NOTE: The above will return an error such as "can't load package ... no Go file in ...", |
74 |
| -#Please just ignore this error and continue on with the installation |
75 |
| -
|
76 |
| -cd $GOPATH/src/github.com/CyberMiles/travis |
77 |
| -git checkout master |
78 |
| -
|
79 |
| -#Incorporate libENI |
80 |
| -sudo rm -rf ~/.travis |
81 |
| -wget -O ~/libeni.tgz https://github.com/CyberMiles/libeni/releases/download/v1.3.4/libeni-1.3.4_ubuntu-16.04.tgz |
82 |
| -tar zxvf ~/libeni.tgz -C ~ |
83 |
| -mkdir -p ~/.travis/eni |
84 |
| -cp -r ~/libeni-1.3.4/lib ~/.travis/eni/lib |
85 |
| -
|
86 |
| -#Continue installing Travis |
87 |
| -cd ~ |
88 |
| -cd $GOPATH/src/github.com/CyberMiles/travis |
89 |
| -make all |
90 |
| -
|
91 |
| -#Configuring Travis test network settings |
92 |
| -cd ~ |
93 |
| -git clone https://github.com/CyberMiles/testnet.git |
94 |
| -cp -r testnet/travis/init .travis |
95 |
| -
|
96 |
| -#Starting Travis test network node |
97 |
| -cd ~ |
98 |
| -travis node init --env testnet |
99 |
| -curl https://raw.githubusercontent.com/CyberMiles/testnet/master/travis/init/config/config.toml > ~/.travis/config/config.toml |
100 |
| -curl https://raw.githubusercontent.com/CyberMiles/testnet/master/travis/init/config/genesis.json > ~/.travis/config/genesis.json |
101 |
| -
|
102 |
| -
|
103 |
| -#Please ensure that the system paths are known, or else the travis command will not be found (you will get an error like this "The program 'travis' is currently not installed") |
104 |
| -
|
105 |
| -echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc |
106 |
| -echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc |
107 |
| -echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc |
108 |
| -source ~/.bashrc |
109 |
| -
|
110 |
| -travis node start --home=./.travis |
111 |
| -
|
112 |
| -``` |
113 |
| - |
114 |
| -You can now attach to the Travis node using the following command |
115 |
| - |
116 |
| -``` |
117 |
| -travis attach http://localhost:8545 |
118 |
| -``` |
119 |
| -## Automated Script - CyberMiles PRIVATE network |
120 |
| - |
121 |
| -Below is a bash script which will get Lity, libENI and a Travis node running on Ubuntu 16.04, as a private network. Running a private network is useful for when you want to perform rapid experimentation; when you do not want to wait to sync with a mainnet or testnet. |
122 |
| - |
123 |
| -Disclaimer: These instructions are for a brand-new disposable 16.04 Ubuntu test instance which has the sole purpose of running and testing the CyberMiles Lity compiler, CyberMiles libENI framework and the CyberMiles testnet called Travis. The following script will initialize a new private blockchain starting at block 0. |
124 |
| -``` |
125 |
| -#/bin/bash |
126 |
| -
|
127 |
| -#Disclaimer: These instructions are for a brand-new disposable 16.04 Ubuntu test instance which has the sole purpose of running and testing the CyberMiles Lity compiler, CyberMiles libENI framework and the CyberMiles testnet called Travis. |
128 |
| -
|
129 |
| -#To use this file copy this text into a file called install_cybermiles_private_network.sh in your fresh disposable Ubuntu 16.04 machine's home directory. Make the file executable by running "sudo chmod a+x ~/install_cybermiles_private_network.sh" and then finally execute the file by running "cd ~" and then "./install_cybermiles_private_network.sh" |
130 |
| -
|
131 |
| -#System preparation Ubuntu 16.04 LTS |
132 |
| -cd ~ |
133 |
| -sudo apt-get -y update |
134 |
| -sudo apt-get -y upgrade |
135 |
| -sudo apt-get -y autoremove |
136 |
| -sudo apt-get -y install gcc |
137 |
| -sudo apt-get -y install git |
138 |
| -sudo apt-get -y install make |
139 |
| -sudo apt-get -y install curl |
140 |
| -sudo apt-get -y install wget |
141 |
| -sudo apt-get -y install cmake |
142 |
| -sudo apt-get -y install bison |
143 |
| -sudo apt-get -y install openssl |
144 |
| -sudo apt-get -y install binutils |
145 |
| -sudo apt-get -y install automake |
146 |
| -sudo apt-get -y install libssl-dev |
147 |
| -sudo apt-get -y install libboost-dev |
148 |
| -sudo apt-get -y install libaudit-dev |
149 |
| -sudo apt-get -y install libblkid-dev |
150 |
| -sudo apt-get -y install e2fslibs-dev |
151 |
| -sudo apt-get -y install build-essential |
152 |
| -sudo apt-get -y install libboost-all-dev |
153 |
| -
|
154 |
| -#Installing Lity |
155 |
| -cd ~ |
156 |
| -git clone https://github.com/CyberMiles/lity.git |
157 |
| -cd lity |
158 |
| -mkdir build |
159 |
| -cd build |
160 |
| -cmake .. |
161 |
| -make |
162 |
| -./lityc/lityc --help |
163 |
| -
|
164 |
| -#Installing SkyPat |
165 |
| -cd ~ |
166 |
| -wget https://github.com/skymizer/SkyPat/archive/v3.1.1.tar.gz |
167 |
| -tar -zxvf v3.1.1.tar.gz |
168 |
| -cd SkyPat-3.1.1 |
169 |
| -./autogen.sh |
170 |
| -./configure |
171 |
| -make |
172 |
| -sudo make install |
173 |
| -
|
174 |
| -#Installing Go |
175 |
| -cd ~ |
176 |
| -bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) |
177 |
| -source $HOME/.gvm/scripts/gvm |
178 |
| -gvm install go1.10.3 -B |
179 |
| -gvm use go1.10.3 --default |
180 |
| -echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc |
181 |
| -echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc |
182 |
| -echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc |
183 |
| -source ~/.bashrc |
184 |
| -
|
185 |
| -#Installing Travis |
186 |
| -go get github.com/CyberMiles/travis |
187 |
| -
|
188 |
| -#PLEASE NOTE: The above will return an error such as "can't load package ... no Go file in ...", |
189 |
| -#Please just ignore this error and continue on with the installation |
190 |
| -
|
191 |
| -cd $GOPATH/src/github.com/CyberMiles/travis |
192 |
| -git checkout master |
193 |
| -
|
194 |
| -#Incorporate libENI |
195 |
| -sudo rm -rf ~/.travis |
196 |
| -wget -O ~/libeni.tgz https://github.com/CyberMiles/libeni/releases/download/v1.3.4/libeni-1.3.4_ubuntu-16.04.tgz |
197 |
| -tar zxvf ~/libeni.tgz -C ~ |
198 |
| -mkdir -p ~/.travis/eni |
199 |
| -cp -r ~/libeni-1.3.4/lib ~/.travis/eni/lib |
200 |
| -
|
201 |
| -#Continue installing Travis |
202 |
| -cd ~ |
203 |
| -cd $GOPATH/src/github.com/CyberMiles/travis |
204 |
| -make all |
205 |
| -
|
206 |
| -#Starting Travis test network node |
207 |
| -cd ~ |
208 |
| -travis node init |
209 |
| -
|
210 |
| -#Please ensure that the system paths are known, or else the travis command will not be found (you will get an error like this "The program 'travis' is currently not installed") |
211 |
| -
|
212 |
| -echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc |
213 |
| -echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc |
214 |
| -echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc |
215 |
| -source ~/.bashrc |
216 |
| -
|
217 |
| -travis node start |
218 |
| -``` |
219 |
| - |
220 |
| -Obviously with a private network there is no syncing required because the blockchain starts at 0 on your own private hardware. You can now attach to the Travis node using the following command. |
221 |
| - |
222 |
| -``` |
223 |
| -travis attach http://localhost:8545 |
224 |
| -``` |
225 |
| - |
226 |
| -There is a preconfigured coinbase account in the private network. You can unlock it using the default password as shown below. Once unlocked you can send value from this evergrowing coinbase account to other new accounts and then get on with your testing and development. |
227 |
| - |
228 |
| -``` |
229 |
| -personal.unlockAccount(cmt.coinbase, "1234") |
230 |
| -``` |
| 4 | +Please see the documentation for building and deploying Travis nodes here: https://travis.readthedocs.io/en/latest/connect-testnet.html |
0 commit comments