πŸŽ‰Setting Up Your Workspace

The steps required for setting up your development workspace.

Prerequisite Knowledge

You are required to have mastery-level knowledge about the topics listed below (not a comprehensive list):

  • Pipenv

  • Pyenv

  • Linux command line usage

  • Python Virtual Environments in general

Basic Setup

  1. Set up an EC2 instance using the Gadget Engineering AMI and connect using SSH.

There is a known issue with pipenv in the AMI that is used for the instances. It is related to the PATH environment variable in the .zshrc file pointing to some root directories. This creates a permissions issue.

Please see this github known issue for resolution.

  1. Create IAM role and configure it with `AWS Configure`.

  2. Once logged into the EC2 instance, configure SSH credentials for GitHub and clone the repository you need.

  3. Before you can contribute to any repository you must first configure GPG to sign all commits.

Installing the Gadget Core Library

  1. Configure your virtual environment in the home directory.

cd ~ \
pipenv shell

2. Configure the VS Code interpreter to point to the new virtual environment interpreter.

Take note of the folder location of this interpreter and always ensure you are pointing to it before doing any work in the future!

note: to test which interpreter is being used in the terminal, you can execute which python and it will show what folder the interpreter is in.

3. Clone the core library to the home directory.

cd ~ \
git clone org-83128860@github.com:permitzip/core.git

3. Install the core library into the virtual environment.

cd ~/core \
pipenv install --dev -e .

4. To test if the gadget core library is installed correctly type which gadget and it should print the same directory of the virtual environment created in the first step.

Understanding the Serverless Folder Structure

Each serverless folder will have a standard collection of files.

Makefile

The Makefile contains a series of useful DevOps commands that make the testing, building, and deployment process consistent as you develop. Make sure you understand how this file works and how to modify it as part of your development process.

Pipfile

The dependencies required to deploy into the lambda environment. This is used to generate the requirements.txt to all lambda functions as listed in the Makefile.

Optional: Linux for Windows Users

Git Bash

wsl2

Last updated