GithubHelp home page GithubHelp logo

asmtal / chainlink-terraform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jleeh/chainlink-terraform

0.0 0.0 0.0 5 KB

Basic Terraform module for provisioning a Chainlink EC2 instance.

License: MIT License

Shell 30.05% HCL 69.95%

chainlink-terraform's Introduction

Chainlink Terraform

Basic Terraform module for provisioning a Chainlink EC2 instance.

Dependencies

How to Use

  1. Firstly install the Terraform cli from the official website and add it to your PATH:

    https://www.terraform.io/downloads.html

  2. Download your AWS programmatic credentials and place them in your user directory ~/.aws:

    https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html

  3. In your AWS console, create a new SSH key pair called chainlink-tf and download it

  4. Run terraform init in this repository directory

  5. Run terraform apply in this repository directory. Once prompted for confirmation, enter yes.

  6. If successful, an output similar to below will be shown:

    Apply complete! Resources: 6 added, 0 changed, 0 destroyed.
    
    Outputs:
    
    public_ip = 1.2.3.4
    
  7. To then access your node, just SSH into the IP shown with the key pair you downloaded:

    ssh -i chainlink-tf.pem -L 6688:localhost:6688 [email protected]

  8. Credentials are generated randomly and stored in /root/.chainlink/api_pw, to get them run:

    cat /root/.chainlink/api_pw

  9. Browse to http://localhost:6688 on your machine, and then enter the credentials from the file.

All done!

Configuration

To edit configuration for the Chainlink instance being created, you can edit the defaults found in variables.tf.

You can also change the variables when running terraform in your CLI. For example, this would restrict SSH access to just your IP:

terraform apply -var 'allowed_cidr=["1.2.3.4/32"]'

Or using a previous Chainlink version:

terraform apply -var 'image_tag=0.5.1'

Or using a different AWS region:

terraform apply -var 'region=eu-west-1'

Updating

Any further updates to this repository can be applied to your own AWS account by re-running terraform apply.

Important: If you're applying changes and notice that the aws_instance is being recreated, this will cause you to loose all your data. If this is shown, backup your /root/.chainlink folder on the instance and copy it to the new one.

Deleting

To destroy the Chainlink EC2 instance and all subsequent resources, run:

terraform destroy

Viewing Logs

If you browse to CloudWatch in the AWS console and click "Logs", you should then see a chainlink-tf group with logs inside it for your Chainlink node.

License

MIT License

chainlink-terraform's People

Contributors

jleeh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.