Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbemmel/spotlab
Sets up a virtual lab environment using an eco-friendly AWS metal instance
https://github.com/jbemmel/spotlab
Last synced: 23 days ago
JSON representation
Sets up a virtual lab environment using an eco-friendly AWS metal instance
- Host: GitHub
- URL: https://github.com/jbemmel/spotlab
- Owner: jbemmel
- License: apache-2.0
- Created: 2021-05-16T17:46:51.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-10T22:44:45.000Z (over 3 years ago)
- Last Synced: 2024-10-05T17:22:02.040Z (3 months ago)
- Language: Shell
- Size: 159 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpotLab
Sets up a virtual lab environment to run Containerlab and SR Linux, using an AWS metal Spot instance.Using an Ansible script, SpotLab finds the cheapest region matching the hourly price you are willing to pay.
It brings up a CentOS baremetal host using AWS CloudFormation, in a matter of minutes.## Getting started
1. Create a new user for spotlab and run the spotlab Docker container, mounting the current user's home directory as a home volume inside the container:```
sudo adduser spotlab
su spotlab
docker run -it --rm -v $HOME:/home/spotlab:Z eccloud/spotlab
```
2. Inside the shell, edit ~/local_settings.yml and insert your AWS credentials:
```AWS_ACCESS_KEY_ID: "...."``````AWS_SECRET_ACCESS_KEY: "...."```
3. Run
```
spotlab_launch_aws_instance -e spotprice=2.50
```
-> you get an AWS Spot baremetal instance if available for $2.50/hour or less.By default this launches a CloudFormation stack with a name including your AWS username;
you can use ```-e altname=myname``` to launch additional labs with different names.4. SSH to your new lab using the IP address printed in the output.
Note that you can see and manage your instance at https://console.aws.amazon.com/cloudformation## Obtaining and working with container images
Once you get a SpotLab instance up and running, you will likely need to obtain container images. There are various ways to go about this:
1. AWS has private Docker repos available
2. SpotLab includes an S3 Fuse FS driver that allows you to mount an S3 bucket as storage