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

VM testnet tx-nodes & blockscout #687

Merged
merged 53 commits into from
Aug 22, 2019
Merged

Conversation

tkporter
Copy link
Contributor

@tkporter tkporter commented Aug 21, 2019

Description

Very chunky PR, here's a rundown of what's included which will make review easier:

  • new optional env var for .env files: VM_BASED
  • tx-nodes now also spun up with Terraform
  • tx-node internal TCP load balancer spun up with Terraform (this is so blockscout on the same VPC network in a kubernetes cluster can talk to the tx-nodes)
  • blockscout working with VM tx-nodes-- blockscout uses the internal IP address of the tx-node internal TCP LB to do all of its RPCs
  • VM testnets have their own VPC networks unless the .env file specifies KUBERNETES_CLUSTER_NAME as celo-networks-dev. This is so ethstats/blockscout that is on the kube cluster celo-networks-dev will be on the same VPC as the VM testnet
  • Refactor of celotool env-related utils out of utils.ts and into env-utils. This is what's to blame for the vast majority of file changes. Unfortunately this was necessary because otherwise I was running into circular import issues :(
  • In order to make sure we don't try to create/destroy the default VPC network with Terraform, I separated out a module for creating/destroying a network. Celotool makes sure this is not done for the default network. Terraform won't allow a network to be destroyed if it's being used by something, but it causes terraform commands to fail, so this was necessary. See packages/terraform-modules/testnet-network/README.md for more deets

Sorry for jamming all this into 1 PR!

Tested

  • Ethstats & blockscout working when on a dev testnet (celo-networks-dev kube cluster and the default VPC network)
  • Ethstats & blockscout working when on a testnet with its own cluster & network

Other changes

I moved a lot of cluster setup logic out of celotooljs deploy initial testnet into a separate function so that deploy initial ethstats or deploy initial blockscout will perform the cluster setup if it hasn't been done already.

I also ran terraform fmt to format the terraform code

Related issues

Backwards compatibility

All existing commands should be backwards compatible

timmoreton
timmoreton previously approved these changes Aug 21, 2019
Copy link
Contributor

@timmoreton timmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@codecov
Copy link

codecov bot commented Aug 22, 2019

Codecov Report

Merging #687 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #687   +/-   ##
=======================================
  Coverage   66.66%   66.66%           
=======================================
  Files         237      237           
  Lines        7065     7065           
  Branches      404      471   +67     
=======================================
  Hits         4710     4710           
+ Misses       2277     2275    -2     
- Partials       78       80    +2
Flag Coverage Δ
#mobile 66.66% <ø> (ø) ⬆️
Impacted Files Coverage Δ
packages/mobile/src/web3/gas.ts 85.71% <0%> (ø) ⬆️
packages/mobile/src/identity/reducer.ts 41.66% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eece4be...348ba89. Read the comment docs.

@tkporter tkporter merged commit a781fa4 into master Aug 22, 2019
@tkporter tkporter deleted the trevor/vm-testnet-tx-nodes branch August 22, 2019 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Devs SBAT deploy tx-nodes on a VM testnet Devs SBAT use blockscout and ethstats with a VM testnet
3 participants