Giter VIP home page Giter VIP logo

serverlessops-workshops's Introduction

Serverless Workshops

This repository contains the ServerlessOps training workshops. These workshops focus on providing the learner with the core skills to build serverless systems and applications.

The workshops in this repository are:

  1. Serverless Up And Running
  2. Serverless Reliability And Operations (coming)
  3. Serverless Security (coming)
  4. Serverless Testing And CI/CD (coming)

Requirements

  • An AWS Account. This may be provided for you when training is delivered by ServerlessOps.
  • Docker (optional). ServerlessOps provides a Docker container with all necessary tools installed.
  • Command-line familiarity. The majority of steps in these workshops will require use of the command line.
  • Code familiarity. The ability to read and understand code is necessary. Most of the code examples are written in Python and the code is kept as simple as possible to make it understandable.

Getting Started

To prepare for these workshops, chooses from one of the options below for setting up your development environment.

  • Docker Based Setup (Recommended)
  • Manual Setup

Docker Based Setup (Recommended)

1. Download and Install Docker.

Download and install Docker CE from the following site if you do not already currently have it.

2. Pull workshop container image.

Execute the following command to pull the workshop container which has a fully configured environment.

docker pull serverlessops/training:latest

3. Start And Configure Container.

To start the container, run the following command

docker run -ti --rm serverlessops/training:latest

After you've started the container you'll be asked to fill in some workshop setup information. Enter a username for the stage name, along with your AWS access and secret keys. (If you're doing this as a part of a class you will have been provided these.)

Stage name: user0
AWS Access Key ID [None]: |ACCESS_KEY_ID|
AWS Secret Access Key [None]: |SECRET_ACCESS_KEY|
Default region name [us-east-1]:
Default output format [json]:

Run the following command and ensure you get back a similar response as below. This indicates your credentials are properly configured.

$ aws sts get-caller-identity
{
    "UserId": "AROAI4AIGYLQKD6SGBBIE:botocore-session-1526934883",
    "Account": "144121712529",
    "Arn": "arn:aws:sts::144121712529:assumed-role/OrganizationAccountAccessUserRole/botocore-session-1526934883"
}

4. Working In The Container

After configuration has been completed you will be placed in the /workshop directory inside the container. All tools needed to complete the workshop are configured and provided. Two editors are available for you to view and edit files.

  • nano
  • vim

You're now ready to start the workshop!

Manual Setup

This section covers manually setting up your development environment. This should only be used if installing Docker is not possible or to understand configuring your own development environment for continuing to explore serverless after this workshop is completed.

Manual Setup (expand for details)

NodeJS / NPM

Our chosen tool for managing serverless systems is written in JavaScript so you will need a Node.JS runtime and package manager. Please install by using one of the methods below.

  • Mac / Homebrew:
brew update && brew install node

Serverless Framework

Serverless Framework is our chosen tool for managing deployment of serverless systems.

  • All OSes:
$ npm install -g serverless

Python:

Our application platform is written in Python 3.6 and we will need a Python runtime installed.

  • Mac / Homebrew:
brew update && brew install node

In addition, you may find pyenv useful for managing Python virtual environments.

  • Mac / Homebrew:
brew update && brew install pyenv
  • Windows / Linux / Generic
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash

AWS Account Setup

Configure AWS credentials by creating the following files if they do not exist for you already, and add the following contents to them. You'll be given an AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY at the start of class to fill in below.

~/.aws/config

[profile training-prime]
region = us-east-1
output = json

[profile training-dev]
region = us-east-1
output = json

[profile training-prod]
region = us-east-1
output = json

~/.aws/credentials

[training-prime]
aws_access_key_id = %%AWS_ACCESS_KEY_ID%%
aws_secret_access_key = %%AWS_SECRET_ACCESS_KEY%%

[training-dev]
source_profile = training-prime
role_arn = arn:aws:iam::144121712529:role/OrganizationAccountAccessUserRole

[training-prod]
source_profile = training-prime
role_arn = arn:aws:iam::820506766567:role/OrganizationAccountAccessUserRole

Lastly, set the following variables in your shell environment. You'll be given a USERNAME when assigned your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY

$ export SLS_STAGE=%%USERNAME%%
$ export AWS_DEFAULT_PROFILE=training-dev

Clone this Github repository

Finally, clone this Github repository and initialize the git submodules.

$ git clone https://github.com/ServerlessOpsIO/aws-serverless-workshops.git
$ cd aws-serverless-workshops
$ git submodule init

serverlessops-workshops's People

Contributors

tmclaugh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.