Project

osiris

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Osiris is a ruby library to interact with AWS Code Deploy.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.10
~> 1.1
 Project Readme

Osiris

Ruby gem to create Code Deploy artifacts, publishes them to S3 bucket, and then allows deployment.

Gem Version

Build Status

First Steps

Setup AWS to allow Code Deploy to work, i.e. decide on S3 buckets, deployment stratagy, on-site deployments.

See on-site deployment

###Development

#!/usr/bin/env ruby

require 'aws-sdk'
require 'osiris'

Aws.config.update({
  region: 'eu-west-1',
  credentials: Aws::Credentials.new(ENV['AWS_SECRET'], ENV['AWS_KEY'])
})

osiris = Osiris::Deployment.new(true)
SERVICE_NAME = 'ServiceName'
AWS_APPLICATION_NAME = 'AWS_APPLICATION_NAME'
AWS_ENVIRONMENT_NAME = 'AWS_ENVIRONMENT_NAME'
AWS_BUCKET_NAME = 's3-deployment-artifacts'
task :publish do
  osiris.publish(AWS_BUCKET_NAME, SERVICE_NAME, PACKAGE_DIR, TravisBuildTools::Version.to_s)
end

task :publish do
  #deploy optionally takes an additonal argument which is an AWS CodeDeploy deployment description.
  osiris.deploy(AWS_BUCKET_NAME, SERVICE_NAME, VERSION, AWS_APPLICATION_NAME, AWS_ENVIRONMENT_NAME)
end

Where

/package/
    appspec.yml
    service/
        #service binaries
    deployment/
        #scripts needed by appspec.yml for deployment