Forge

EC2 fleets made easy


Project maintained by carsdotcom Hosted on GitHub Pages — Theme by mattgraham

Home


Environmental Yaml (setup by admins)

Each forge job requires an environment created. This includes an environment yaml and the default user data scripts (optional).

Setup

https://github.com/carsdotcom/cars-forge/blob/main/examples/env_yaml_example/example.yaml

Option 1: Copy files to the config folder

  1. Referring to the example yaml, create your environment yaml file.
  2. Create your default user data script (optional). An example can be found here.
    • In the user_data parameter in the environment yaml, you can specify what the default user data script should be if the user does not provide one.
    • echo "$(cat /root/.ssh/authorized_keys | sed 's/^.*ssh-rsa/ssh-rsa/')" > /root/.ssh/authorized_keys is needed in all user data scripts because Forge runs all commands as root.
  3. Run forge configure -h
    • This will output the location of the configure folder.
    • Example: Configure env yaml and place it in /home/ec2-user/.local/lib/python3.7/site-packages/forge/config/
  4. Create a new folder under the config folder.
    • E.g.
       mkdir -p /home/ec2-user/.local/lib/python3.7/site-packages/forge/config/example`
      
  5. Copy your environment yaml and user data script to the new folder.

Option 2: Use forge configure

  1. Run forge configure and fill in all the parameters.
  2. Create your default user data script (optional). An example can be found here.
    • In the user_data parameter in the environment yaml, you can specify what the default user data script should be if one is not provided.
    • echo "$(cat /root/.ssh/authorized_keys | sed 's/^.*ssh-rsa/ssh-rsa/')" > /root/.ssh/authorized_keys is needed in all user data scripts because Forge runs all commands as root.
  3. Run forge configure -h
    • This will output the location of the configure folder.
    • Example: Configure env yaml and place it in /home/ec2-user/.local/lib/python3.7/site-packages/forge/config/
  4. Locate the environment under the config folder. The folder name will be the same as the name you used when you ran forge configure.
  5. Copy your user data script to the new folder.

Environmental parameters (setup by admins)