Skip to main content

This cli contains aws labs to try.

Project description

# awslabs
[awslabs](https://gitlab.com/binxio/awslabs) is a program that challenges your AWS knowledge.

## Installing

The simplest method is to install awslabs with `pip3`:

pip3 install .

## Development installation
To start for development type the following:

```bash
make init
make develop
```

## Run awslabs for development
Type the following:

```bash
pipenv run python -m awslabs list
```

To run a track you are working on type:

```bash
pipenv run python -m awslabs <your-track> start
```

## Package awslabs
To package awslabs type:

```bash
make dist
```

## TODO

Refine the following ideas.

Errors:
* Ensure it can only be used in python3

Refactor/fix:
* The deep if/else/try-statements makes it a horror
* Remove the meta files/folders (__init__.py / __pycachec__ etc)
* Consider replacing mytrack.py to yaml
* Make region independent
* Make the cloudformation input json compatible, and optionally a different file with a parameter in click
* Make it easy to save progress details in

Features:
* Add tests (cloudformation already has the "perfect" cloudformation scripts)
* Users can first read the track (awslabs trackname / awslabs trackname info)
* Group tracks in "basic" and "advanced" (to be able to do the advanced, you need to have basic knowledge)
* Write start time to config for report in the feedback the progress
* Make awslabs track stop (or abort) such that it will warn if resources are still running
* Add a short description to the tracks to improve track selection

```
$ awslabs

Tracks available:

Basic:
ec2 Deploy ec2 instance with init
autoscaling Deploy an autoscaling group
s3 Use the S3 service
ml-api Use the machine learning api's

Advanced:
kinesis-athena Kinesis, Firehose, S3, Athena
ecs ECS Cluster with Service Discovery
wordpress Learn ELB, Autoscaling, RDS, Route53
```

## Create a simple challenge
To create a challenge, do the following:

- Create a directory in tracks called eg. `mytrack`,
- create a `mytrack.py` file in `mytrack`
- create a directory `challenges` in `mytrack`
- create multiple challenge files starting from `01.py` and so on.

## Tracks
Tracks are called `mytrack.py` and must contain at a minimum the following:

```python
from awslabs.track import Track

class MyTrack(Track):
"""
A track description, can be multiline and contain links etc.
"""
name = "TrackName"
description = __doc__
level = "basic"
short_description = "a short description"
```

## Challenges
Challenges are named `01.py` and so on, and must contain at a minimum the following:

```python
from awslabs.challenge import Challenge

class MyChallenge(Challenge):
"""
Put your challenge
"""
title = "My Challenge"
description = __doc__

def start(self) -> None:
self.instructions()

def validate(self) -> None:
self.save('key', 'a-value-to-save') # save a value to the session
self.get('key') # load a value from the session
self.check() # check the challenge
self.success('') # mark the challenge as succesful
self.fail('') # mark the challenge as failure
```



Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

awslabs-0.1.1-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file awslabs-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: awslabs-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.0

File hashes

Hashes for awslabs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 565071ade4538b3026b68df6f5bc805436510d58e278e2c4c10bf2a6644b1916
MD5 4e25cc433150f0085b53341e3ddf5137
BLAKE2b-256 905263eef3e4f91c830d54e105a9a01ae3a95c4ad9793d3f397815ce1592ef7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page