You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch '48-as-a-lisk-user-i-want-to-use-utu-protocol-without-switching-wallets-or-networks' into 'main'
From 48-as-a-lisk-user-i-want-to-use-utu-protocol-without-switching-wallets-or-networks into main Change branches
Closes #48
See merge request ututrust/utu-trust-token-solidity!58
-[Set Up a Chainlink Node on AWS Console | Tutorial](https://www.youtube.com/watch?v=klqQnzBUqUw)
244
-
245
-
We need to create an EC2 instance:
246
-
* 1\. Creating a new instance
247
-
* 1.1\. Visit the EC2 dashboard. If there’s a running instance (and it’s dedicated for the chainlink node job), skip to step 2.1. If there’s no such instance, proceed to the next step.
248
-
* 1.2\. Click the `Launch instance` button.
249
-
* 1.3\. Select `t2.small` instance type.
250
-
* 1.4\. Click on the `Review and Launch` button.
251
-
* 1.5\. Click on the `Launch` button.
252
-
* 1.6\. Set a key pair name.
253
-
* 1.7\. If you would like to SSH into the instance later (through your chosen terminal emulator, instead of the AWS web UI), hit the `Download Key Pair` button.
254
-
* 1.8\. Click on the `Launch instances` button.
255
-
* 1.9\. Click on the `View instances` button, to see the running instances (incl. the one we’ve just launched).
256
-
* 2\. Connecting to the instance.
257
-
* 2.1\. Click on the instance ID.
258
-
* 2.2\. Click on the `Connect` button (it will redirect you to the `Connect to instance` page).
259
-
* 2.3\. Click on the `Connect` button (it will open a new terminal session).
260
-
* 2.4\. Check if Docker is up-and-running by executing the following command:
237
+
### Chainlink Node
261
238
262
-
```shell
263
-
$ systemctl status docker
264
-
```
265
-
266
-
If it’s running, procced to step 2.6. If it’s not, proceed to the next step.
267
-
268
-
* 2.5\. Since Docker is not set up, you’ll have to manually install and configure it by issuing the following commands:
269
-
270
-
```shell
271
-
$ sudo systemctl start docker
272
-
$ sudo gpasswd -a $USER docker
273
-
```
274
-
275
-
* 2.6\. Go ahead and create a directory for the Chainlink node.
276
-
277
-
```shell
278
-
$ mkdir ~/.chainlink
279
-
$ cd~/.chainlink
280
-
```
281
-
282
-
* 2.7\. Create a new .env file inside the directory and fill in the credentials.
283
-
284
-
```shell
285
-
$ vim ~/.chainlink/.env
286
-
```
287
-
288
-
RDS instance:
289
-
* 3\. Creating a new database instance.
290
-
* 3.1\. Visit the RDS dashboard. If there’s a PostgreSQL instance running (and it’s dedicated for the chainlink node job), skip to step 4.1. If there’s no such instance, proceed to the next step.
291
-
* 3.2\. Click on the `Create database` button.
292
-
* 3.3\. Select PostgreSQL.
293
-
* 3.4\. Select PostgerSQL 14.5 version.
294
-
* 3.5\. Select `Free tier` template (if it’s not available, try with different versions and keep in mind that the UI might take several seconds to update the set of available templates).
295
-
* 3.6\. Set database identifier, e.g. `chainlink-db`.
296
-
* 3.7\. Set master username, e.g. `postgres`.
297
-
* 3.8\. Set master password and write it down somewhere safe.
298
-
* 3.9\. Disable storage autoscaling by deselecting `Enable storage autoscaling`.
299
-
* 3.10\. Click on `Additional configuration`.
300
-
* 3.11\. Set your initial database name, e.g. `chainlink-ethereum-db`.
301
-
* 3.12\. Disable automatic backups by deselecting `Enable automatic backups`.
302
-
* 3.13\. Go ahead and hit `Create database`.
303
-
* 4\. Set up database credentials.
304
-
* 4.1\. Visit the RDS dashboard.
305
-
* 4.2\. Click on the DB identifier, e.g. `chainlink-db`.
306
-
* 4.3\. Copy the database endpoint (Connectivity & security panel). If it’s not available, it’s probably because you’ve just created the database and it has not been fully deployed. Take a short break and give it a few minutes.
307
-
* 4.4\. Connect to the EC2 instance (as described in steps 2.1/2.2./2.3.)
308
-
* 4.5\. Edit `~/.chainlink/.env` (as described in step 2.7) and update the database endpoint (the environment variable is called `DATABASE_URL` and you have to replace all nested variables).
239
+
A Dockerfile and accompanying docker-compose.yml are provided under the [chainlink-node](chainlink-node) directory.
`$USERNAME` and `$PASSWORD` have been created in step 3.7.
315
-
must be set to the default value of 5432 (unless something else has been set during the database creation).
316
-
`$DATABASE` is what we’ve set in step 3.11.
317
-
`$SERVER` corresponds to the endpoint we’ve copied in step 4.3.
318
-
319
-
Docker:
320
-
* 5\. Set up the Docker container
321
-
* 5.1\. Pull the image from hub.docker.com/r/smartcontract/chainlink.
322
-
323
-
```shell
324
-
$ docker pull smartcontract/chainlink:1.7.1-root
325
-
```
326
-
327
-
* 5.2\. Change your working directory
241
+
It automatically creates the correct configuration and jobs, using templates under the [config](chainlink-node/config) and [jobs](chainlink-node/jobs) sub-directories.
328
242
329
-
```shell
330
-
$ cd~/.chainlink
331
-
```
332
-
333
-
* 5.3\. Start the container.
334
-
335
-
```shell
336
-
$ docker run -p 6688:6688 -v ~/.chainlink:/chainlink -it --env-file=.env smartcontract/chainlink:1.7.1-root local n
337
-
```
338
-
339
-
### Set up a Chainlink Node job
340
-
341
-
1. Visit `$NODE_ADDRESS:6688` (`$NODE_ADDRESS` is the public IPv4 DNS of your previously configured EC2 instance).
342
-
2. Login with your ChainLink node account credentials.
343
-
3. Navigate to the jobs page (press the "Jobs" button in the top menu).
344
-
4. Press the "New Job" button.
345
-
5. Paste the following TOML job specification
346
-
6. Replace `REPLACE_WITH_ORACLE_CONTRACT_ADDRESS` with the oracle contract address everywhere specified in the job definition
347
-
7. Replace `REPLACE_WITH_UTU_CLIENT_DB_ID` with the utu client db id in the job definition
0 commit comments