π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
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.
Create IAM role and configure it with `AWS Configure`.
Once logged into the EC2 instance, configure SSH credentials for GitHub and clone the repository you need.
Before you can contribute to any repository you must first configure GPG to sign all commits.
Installing the Gadget Core Library
Configure your virtual environment in the home directory.
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.
3. Install the core library into the virtual environment.
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