Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Create AWS machine image #826

Open
2 tasks
MCJOHN974 opened this issue Nov 12, 2024 · 2 comments · May be fixed by #853
Open
2 tasks

[Feature]: Create AWS machine image #826

MCJOHN974 opened this issue Nov 12, 2024 · 2 comments · May be fixed by #853
Assignees

Comments

@MCJOHN974
Copy link
Collaborator

MCJOHN974 commented Nov 12, 2024

Feature - AWS image

1. Description

Create AWS machine image which will be synced with testnet and have all software needed to deploy an sBTC signer on testnet.

1.1 Context & Purpose

We want to deploy the sBTC to testnet with a similar setup to how we're recommending things be deployed on mainnet. For that we will build an AMI with the necessary applications to run and configure an sBTC signer.

2. Technical Details:

The high level steps to do this is as follows:

  1. Launch an EC2 instance.
  2. Install the necessary applications, which includes bitcoin-core and stacks-core.
  3. Make sure the chainstate is up-to-date on the machine.
  4. Save the AMI.

We'd like to automate the above process, so I'd recommend using packer for the automated build process, but the first time around you would do this all manually first.

A more detailed breakdown of the steps that are necessary are as follows.

  1. Get an AWS account with enough permissions to do the things that need doing.
  2. Go to AWS website, launch EC2 instance.
    1. c6i.xl with 100 GB HD. Use NVMe drives.
    2. setup VPC security groups for SSHing into the machine.
    3. create a keypair.
  3. Install dependencies: docker, watchtower, ansible.
  4. Add in docker compose file and other config files. This docker compose file will have service entries for everything that is necessary on testnet.
  5. Do docker compose pull to store the images on the machine.
  6. Get the primary testnet chainstate data. This can be done by setting up an EBS volume and attaching it to the image or by pulling it from S3 as part of the AMI build process. The stacks chainstate data can be found here https://archive.hiro.so/testnet/stacks-blockchain/, but there isn't a similar archive for the bitcoin blockchain.
  7. Do docker compose up. Not sure if we want to do this as part of the automated build process.
  8. Build AMI from running EC2 instance.
  9. Write files for automatically doing steps (2-10) using packer.

2.1 Acceptance Criteria:

  • We have an AMI with everything that is necessary for primary testnet.
  • We have a packer file that allows us to recreate the image if we need to do so.

3. Related Issues and Pull Requests (optional):

@MCJOHN974 MCJOHN974 self-assigned this Nov 12, 2024
@MCJOHN974 MCJOHN974 added this to sBTC Nov 12, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Nov 12, 2024
@MCJOHN974
Copy link
Collaborator Author

@AshtonStephens can you please help figuring out what actually this issue should be

@MCJOHN974
Copy link
Collaborator Author

@djordon probably you also can help here

@djordon djordon added this to the sBTC: Deposit ready milestone Nov 12, 2024
@djordon djordon moved this from Needs Triage to Todo in sBTC Nov 12, 2024
@MCJOHN974 MCJOHN974 linked a pull request Nov 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants