Skip to content

Slides from the Wroclaw Devops Meetup presentation and sample sceptre projects

License

Notifications You must be signed in to change notification settings

janrotter/sceptre_devops_meetup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sceptre DevOps Meetup

Slides from the Wroclaw Devops Meetup presentation and sample sceptre projects

How to run the presentation?

Install reveal-md using npm:

npm install -g reveal-md

Run:

reveal-md presentation/rule_the_aws.md

How to use the example projects?

The easiest way to take advantage of the examples is to use Vagrant. This will allow you to play with sceptre without the risk of altering your current computer setup.

Once installed, simply run vagrant up followed by vagrant ssh to access the Vagrant VM.

You will also need AWS access credentials. If you just want to play with the provided examples, the best way is to simply spin up the attached cloudformation template inside a sandbox account (you can create one using AWS Organizations). It will create a sceptre user with the required permissions. The access key id and the secret access key will be available in the stack outputs. Note: the permissions there are too strict for real-world sceptre usage..

Inside the Vagrant VM create a file ~/.aws/config with your credentials:

[profile sceptre_sandbox]
aws_access_key_id = AKIA...
aws_secret_access_key = OwQ...

Then navigate to either /vagrant/v1 or /vagrant/v2 for examples for sceptre v1 and v2 respectively.

Once there, run: pipenv shell followed by pipenv install to setup the virtual environment with the appropriate sceptre version.

Now you can easily play with the provided sceptre projects!

For instance:

vagrant@ubuntu-bionic:~$ cd /vagrant/v1
vagrant@ubuntu-bionic:/vagrant/v1$ pipenv shell
Launching subshell in virtual environment…
vagrant@ubuntu-bionic:/vagrant/v1$  . /home/vagrant/.local/share/virtualenvs/v1-jH8cTHgZ/bin/activate
(v1) vagrant@ubuntu-bionic:/vagrant/v1$ pipenv install
Installing dependencies from Pipfile.lock (6198e0)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 16/16 — 00:00:04
(v1) vagrant@ubuntu-bionic:/vagrant/v1$ ls
0_initial_setup  1_basic_structure  2_resolvers  3_hooks  4_jinja  Pipfile  Pipfile.lock
(v1) vagrant@ubuntu-bionic:/vagrant/v1$ cd 1_basic_structure/
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$ tree
.
├── config
│   ├── config.yaml
│   ├── devaccount
│   │   └── eu-west-1
│   │       └── dummy.yaml
│   └── prodaccount
│       └── eu-west-1
│           ├── dummy.yaml
│           └── dummyB.yaml
└── templates
    └── dummy.yaml

6 directories, 5 files
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$ sceptre launch-env devaccount
[2018-11-25 21:12:00] - sceptre.stack - devaccount/eu-west-1/dummy - Launching stack
[2018-11-25 21:12:00] - sceptre.stack - devaccount/eu-west-1/dummy - Stack is in the PENDING state
[2018-11-25 21:12:00] - sceptre.stack - devaccount/eu-west-1/dummy - Creating stack
[2018-11-25 21:12:01] - sceptre.stack - 2018-11-25T21:12:00+00:00 devaccount/eu-west-1/dummy sceptre-1-devaccount-eu-west-1-dummy AWS::CloudFormation::Stack CREATE_IN_PROGRESS User Initiated
[2018-11-25 21:12:09] - sceptre.stack - 2018-11-25T21:12:05+00:00 devaccount/eu-west-1/dummy DummyResource AWS::CloudFormation::WaitConditionHandle CREATE_IN_PROGRESS
[2018-11-25 21:12:09] - sceptre.stack - 2018-11-25T21:12:05+00:00 devaccount/eu-west-1/dummy DummyResource AWS::CloudFormation::WaitConditionHandle CREATE_IN_PROGRESS Resource creation Initiated
[2018-11-25 21:12:09] - sceptre.stack - 2018-11-25T21:12:05+00:00 devaccount/eu-west-1/dummy DummyResource AWS::CloudFormation::WaitConditionHandle CREATE_COMPLETE
[2018-11-25 21:12:09] - sceptre.stack - 2018-11-25T21:12:07+00:00 devaccount/eu-west-1/dummy sceptre-1-devaccount-eu-west-1-dummy AWS::CloudFormation::Stack CREATE_COMPLETE
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$ sceptre delete-env devaccount
[2018-11-25 21:12:42] - sceptre.stack - devaccount/eu-west-1/dummy - Deleting stack
[2018-11-25 21:12:42] - sceptre.stack - 2018-11-25T21:12:42+00:00 devaccount/eu-west-1/dummy sceptre-1-devaccount-eu-west-1-dummy AWS::CloudFormation::Stack DELETE_IN_PROGRESS User Initiated
[2018-11-25 21:12:46] - sceptre.stack - devaccount/eu-west-1/dummy - delete complete
(v1) vagrant@ubuntu-bionic:/vagrant/v1/1_basic_structure$ exit
vagrant@ubuntu-bionic:/vagrant/v1$

About

Slides from the Wroclaw Devops Meetup presentation and sample sceptre projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages