Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use .deb for deployment #40

Merged
merged 4 commits into from
Feb 14, 2017
Merged

Use .deb for deployment #40

merged 4 commits into from
Feb 14, 2017

Conversation

TBonnin
Copy link
Contributor

@TBonnin TBonnin commented Feb 14, 2017

Modifies prism to use .deb for deployment. This is necessary to move away from machine-images to amigo

Tested in CODE

@TBonnin TBonnin requested a review from sihil February 14, 2017 11:45
build.sbt Outdated
@@ -36,16 +38,26 @@ libraryDependencies ++= Seq(

scalacOptions ++= Seq("-feature")

javaOptions in Universal ++= Seq(
s"-Dpidfile.path=/dev/null"
Copy link
Contributor Author

@TBonnin TBonnin Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbt-native-packager maintainer recommends to let play not handle the pid file: sbt/sbt-native-packager#377 (comment)

Copy link
Contributor

@sihil sihil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments, some entirely off topic.
👍

"#!/bin/bash -ev\n",
"/opt/features/native-packager/install.sh -b deploy-tools-dist -s -t tgz\n"
"#!/bin/bash -ev",
"mkdir /prism",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/tmp here?

build.sbt Outdated
javaOptions in Universal ++= Seq(
s"-Dpidfile.path=/dev/null"
)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def env(key: String): Option[String] = Option(System.getenv(key))

lazy val root = (project in file("."))
.enablePlugins(PlayScala, RiffRaffArtifact, UniversalPlugin)
.settings(
packageName in Universal := normalizedName.value,
maintainer := "Guardian Developers <[email protected]>",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should create an email address for tools, but this will do for now.

"mkdir /prism",
{ "Fn::Join": [ "", [ "aws --region eu-west-1 s3 cp s3://deploy-tools-dist/deploy/", { "Ref": "Stage" }, "/prism/prism.deb /prism/" ] ] },
"dpkg -i /prism/prism.deb",
"systemctl start prism"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I'd love to aim for userdata zero as I think there lies potential for more reusable CFN templates - but that's not enormously relevant here, just my philosophy.

@TBonnin TBonnin merged commit e250731 into master Feb 14, 2017
@TBonnin TBonnin deleted the tb-deb-package branch February 14, 2017 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants