WHAT IS MITHRAS? ###############################################################################
See the Mithras main site at mithras.io for more information.
Use Mithras to deploy and configure full-stack applications in AWS, with agentless setup and the flexibility and power of a Javascript configuration language.
Mithras focuses on AWS, making design choices that make simple AWS tasks easy, including features like explicit dependency declaration and idempotent operations.
Mithras presents a simplified interface, reducing the surface area of the AWS SDK to a digestible and easily managed size.
Using brittle data languages such as YAML make customizing your configuration unecessarily convoluted. Mithras chooses a well-known and powerful language for descriving your AWS configurations: Javascript. You won't have to twist an unsuitable language to do what's needed for your configuration.
Here are some uses cases for Mithras:
- Provisioning
- Configuration Management
- App Deployment
- Continuous Delivery
- Orchestration
Sounds pretty nifty, eh? But it's not perfect. If you need enterprise configuration management features, Mithras isn't a good choice. (Not yet, anyway.) If you have the need to manage hosts and resources outside AWS, Mithras probably isn't a good choice. If you love YAML, don't bother with Mithras.
Finally, Mithras is new. It's currently alpha quality software, with bugs and design choices still being shaken out. Proceed with caution.
DESIGN ###############################################################################
- AWS first
- Javascript DSL
- Simple (abstract) aws interface - not a port of the aws sdk to js
- Agentless
- Idempotent
- Declarative resources
- Explicit dependencies
- Immutable infrastructure
BUILDING FROM SOURCE ###############################################################################
- Set up a standard Go 1.6 environment http://golang.org/doc/code.html and ensure that $GOPATH environment variable properly set.
go get github.com/cvillecsteele/mithras
.cd $GOPATH/src/github.com/cvillecsteele/mithras
go install
to build the mithras binary- Make sure $GOPATH/bin is in your $PATH.
RUNNING ###############################################################################
- Mithras depends on using
ssh-agent
. Make sure it is set up and has the right keys added. - Set up a site directory. Let's say it's '~/projects/my_site'
EXPORT MITHRASHOME=~/projects/my_site
.- Create your site file,
site.js
. - Set up your AWS credentials file and specify a profile to use with
export AWS_PROFILE=...
. (See: https://github.com/aws/aws-sdk-go/wiki/configuring-sdk) - Build remote runner and wrapper with
mithras build
mithras -v run
To run the example from the mithras repo:
`$ mithras -v run -f example/site.js`
To run a JS repl:
`$ mithras repl`
TODO ###############################################################################
-
IAM: check policies is an object with string keys
-
IAM: let role.AssumeRolePolicyDocument be an object
-
throw instead of os.exit?
-
document ASG solution
-
parallelize with workers?
-
explainer videos
-
document workers better
-
make sure no handlers are interacting with AWS outside the catalog (s3)
-
rework / robustify web core module
-
signals?
-
nodjs-like 'process' object?
-
more s3 configuration support for buckets
-
repl should have mithras env loaded
-
copy - localFile so we don't read it into memory??
-
test base config in nginx
-
versioned js modules
-
better nodejs package support
BUILDING DOCS ###############################################################################
Run:
mithras -v run -f dev/website.js
To serve docs locally, first install harp, then:
cd website && harp server
ISSUES ###############################################################################
- damn it's a big hunk of code... 28Mb???... NO... Now 30!!
- phew is otto sloowwww