Layer 0

decentralized infrastructure for serverless computing operations

Layer 0

Layer 0 includes core infrastructure scripts for managing physical machines such as terraform and related scripts. Layer 0 is organized in profiles.

The default profile packet provisions a single node on Packet and configures the DNS using Cloudflare.

To add profile create a directory under layer0 with the name of the profile and create a Make file with the below tasks:




make layer0-<action>-[stack]


  • Initiallize default stack, packet:
      make layer0-init
  • Initiallize akash-packet stack
      make layer0-init-akash-packet 

Available Commands

make layer0-init
make layer0-plan
make layer0-apply
make layer0-destroy

Provision Resources

1. Setup Credentials

# packet api keys in profile
echo $PACKET_TOKEN > data/db/keys/packet.api.token

# packet project id in project home URL
echo $PACKET_PROJECT_ID > data/db/keys/

## cloudflare api keys in profile
echo $CLOUDFLARE_API_TOKEN > data/db/keys/cloudflare.api.token

2.Provision Machines

make layer0-init
make layer0-apply

3. Update Config DB

echo node1.${MACHINE_ZONE} > data/db/index/HOSTS