Skip to content

adjacentresearchxyz/solana-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deployment

Deployment of NixOS via terraform with monitoring and log collection along with some packages for the solana cli and wallet tracking

Authenticating

  • Login to aws-cli
  • Symlink it to your deployment repository
  • Install a .pem file for aws deployments
    • The key name that you used here in the AWS console will be used in the aws_instance.machine.key_name

Layout

├── *.auto.tfvars
├── README.md
├── id_rsa.pem
├── main.tf
├── nixos
│   ├── README.md
│   ├── configuration.nix
│   ├── flake.lock
│   ├── flake.nix
│   ├── grafana
│   │   ├── dashboards
│   │   │   ├── logging.json
│   │   │   └── node_exporter.json
│   │   └── grafanaDatasources.yml
│   ├── home.nix
│   └── promtail.yaml
└── variables
    └── base.tfvars
  • Terraform is used for deploying to various cloud environment
    • Terraform .tfvars files specified in the ./variables directory for different configurations
  • NixOS configurations deployed for deployment of identical systems
    • Includes deployment and management of default services
      • fail2ban for basic DDOS protection
      • grafana with system monitoring dashboards
      • loki for system log collection
      • prometheus for system statistics collection

Deploying

# copy `variables/base.tfvars`
cp ./variables/base.tfvars *.auto.tfvars

# enter the variables you want to deploy with into `*.auto.tfvars`
# note this is were you enter your AWS keys

# plan and then apply the configuration
terraform plan
terraform apply

VSCode Server

If you want to develop on the host remote vscode-server has been added but you will have to enable once in the server with

systemctl --user enable auto-fix-vscode-server.service
systemctl --user start auto-fix-vscode-server.service

Solana

In order to have the address tracking for solana as a dashboard you will need to

# edit `/etc/nixos/services/prometheus_account_exporter/projects/solana/solana.rs` and add your address in the address vector

# build the binary 
nix-shell -p cargo libiconv openssl pkgconfig --run "cargo build --release --example solana --feature=hyper_server"

following a standard nixos-rebuld switch --flake /etc/nixos#nixos you should be good to go

About

Deployment for operating on Solana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published