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:
layer0-init
layer0-plan
layer0-apply
layer0-destroy
make layer0-<action>-[stack]
Examples:
- Initiallize default stack,
packet
:make layer0-init
- Initiallize
akash-packet
stackmake layer0-init-akash-packet
make layer0-init
make layer0-plan
make layer0-apply
make layer0-destroy
# 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/packet.project.id
## cloudflare api keys in profile
echo $CLOUDFLARE_API_TOKEN > data/db/keys/cloudflare.api.token
make layer0-init
make layer0-apply
echo node1.${MACHINE_ZONE} > data/db/index/HOSTS