Panfactum LogoPanfactum
Getting StartedBoot Developer Environment

Boot Developer Environment

Objective

Launch the developer environment to automatically install and configure all the remaining tools.

Repository Setup

Now that you have the tooling installed:

  1. Download your organization's git repository that contains your infrastructure code. Refer to your organization's instructions for additional detail if necessary. 1

  2. cd into the cloned directory.

  3. You should now see an error message that looks like the following:

    direnv: error /home/user/repos/your-repo/.envrc is blocked. Run `direnv allow` to approve its content
    

    Run direnv allow to whitelist this directory.

    If you do not see this message, ensure that you installed the direnv shell hook and retry. If the issue persists, restart your terminal session.

  4. Once allowed, direnv will install devenv. The repo's devenv module defines all additional tooling that needs to be installed, and the installer should immediately run. It will look similar to the below:

    direnv: loading ~/repos/your-repo/.envrc
    Building shell ...
    direnv: export +AWS_CONFIG_FILE +AWS_SHARED_CREDENTIALS_FILE +C_INCLUDE_PATH +DEVENV_DOTFILE +DEVENV_PROFILE ...
    

    This may take several minutes to complete as the remaining local development dependencies are installed. Fortunately, these steps are cached and subsequent shell launches should be nearly instant. 2

  5. If everything completes successfully, you should have the following environment variables set (check via printenv | grep DEVENV):

    DEVENV_DOTFILE=/home/user/repos/your-repo/.devenv
    DEVENV_ROOT=/home/user/repos/your-repo
    DEVENV_PROFILE=/nix/store/xxxxxxxxxxxxxxxxxxxxxxxxx-devenv-profile
    DEVENV_STATE=/home/user/user/repos/your-repo/.devenv/state

    Your values will be specific to your machine and the above is just an example.

Setting up User Variables

The repository has two sets of top-level configuration variables that will control the devenv's behavior:

  • shared: Set up in the repo's devenv.nix by your organization's administrators (docs)
  • personal: Unique to you and set up in a top-level .env file (docs)

As the shared variables should have already been set up, we will now configure your personal variables.

In the root of the repo, create a .env file that follows the dotenv format.

For the complete list of values, see the Panfactum reference docs.

Next Steps

Now that you have your organization's tooling installed, we can begin to set up connections to the live infrastructure.

PreviousNext
Getting Started Guide:
Step 3 /4

Footnotes

  1. If you are trying to connect to the demo environment, download the stack repository and pretend that the packages/reference directory is the root of your organization's repo.

  2. On MacOS, the initial installation can take up to 30 minutes as most utilities are recompiled from source.