Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
target
.idea
*.iml
35 changes: 35 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
node {
stage name:"Checkout"
checkout scm;

stage name:"Dependencies"
buildTempDeps()

stage name:"Build"
build()

}


def build() {

def mvnHome = tool 'latest'
env.MAVEN_OPTS="-Xmx2G";

sh "${mvnHome}/bin/mvn clean install"

}

def buildTempDeps() {
// Temporary dependencies to things that have not yet been fixed
dir('docker-java') {

git url: "https://github.com/magnayn/docker-java.git"

def mvnHome = tool 'latest'
env.MAVEN_OPTS="-Xmx2G";

sh "${mvnHome}/bin/mvn -DskipTests clean install"
}

}
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# SnowGlobe
Container Management Tool
Infrastructure as Code

## What is SnowGlobe

SnowGlobe is a tool in the same area as Terraform, Cloudformation, docker-compose.

SnowGlobe is currently very experimental. It is useful for us in our deployment scenarios!

These tools aim to allow you to 'describe' how infrastructure is to be deployed, and allow incremental changes to be made. Instead of writing scripts that perform steps, your configuration defines what you want the outcome to look like, and the tooling figures out the necessary steps needed to make it work.


It is very similar to (and deeply inspired by) Terraform - but with some differences

* SnowGlobe scripts are code. The script is a DSL script built on top of groovy - so all valid groovy (and thus all valid java) can be used.
- This should make more 'advanced' deployment scenarios such as blue/green deployments easier to achieve without building external tools that must modify the deployment descriptor.

* SnowGlobe is built on Java/Groovy rather than golang

* Terraform tends to concentrate more on AWS - we are interested (primarily) in Docker, though other providers could easily be added

* It is easier to build 'layers' in SnowGlobe (e.g: a 'base' layer that defines a consul-on-docker, and an 'app' layer that then uses it.

* Terraform is much more mature and has more effort applied to it.

55 changes: 55 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nirima</groupId>
<artifactId>snowglobe</artifactId>
<packaging>pom</packaging>
<version>0.1-SNAPSHOT</version>

<properties>
<gmavenVersion>1.5</gmavenVersion>
<gmavenProviderSelection>2.0</gmavenProviderSelection>
<groovyVersion>2.4.7</groovyVersion>
</properties>

<scm>
<connection>scm:git:git://github.com/nirima/SnowGlobe.git</connection>
<developerConnection>scm:git:git@github.com:nirima/SnowGlobe.git</developerConnection>
<url>http://github.com/nirima/SnowGlobe</url>
</scm>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<fork>true</fork>
<!--<compilerArgument>-parameters</compilerArgument>-->

</configuration>
</plugin>
</plugins>
</build>

<modules>
<module>snowglobe-core</module>
<module>snowglobe-jenkins</module>
<module>snowglobe-exe</module>
<module>snowglobe-shaded</module>
<module>snowglobe-jenkins-plugin</module>
</modules>

<!-- <dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.14</version>
</dependency>
</dependencies> -->

</project>
143 changes: 143 additions & 0 deletions snowglobe-core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.nirima.snowglobe</groupId>
<artifactId>snowglobe-core</artifactId>

<parent>
<groupId>com.nirima</groupId>
<artifactId>snowglobe</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>



<build>
<plugins>

<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>${gmavenVersion}</version>
<executions>
<execution>
<goals>
<goal>addSources</goal>
<goal>addTestSources</goal>
<!--<goal>generateStubs</goal>-->
<goal>compile</goal>
<!--<goal>testGenerateStubs</goal>-->
<goal>testCompile</goal>
<!--<goal>removeStubs</goal>-->
<!--<goal>removeTestStubs</goal>-->
</goals>
</execution>
</executions>
</plugin>
<!--<plugin>-->
<!--<groupId>org.codehaus.gmaven</groupId>-->
<!--<artifactId>gmaven-plugin</artifactId>-->
<!--<version>${gmavenVersion}</version>-->

<!--<configuration>-->
<!--&lt;!&ndash;<source>src/main/groovy</source>&ndash;&gt;-->
<!--<providerSelection>${gmavenProviderSelection}</providerSelection>-->
<!--<sourceEncoding>UTF-8</sourceEncoding>-->
<!--<source/>-->
<!--</configuration>-->
<!--<executions>-->
<!--<execution>-->
<!--<goals>-->
<!--<goal>generateStubs</goal>-->
<!--<goal>compile</goal>-->
<!--<goal>generateTestStubs</goal>-->
<!--<goal>testCompile</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<!--<dependencies>-->
<!--<dependency>-->
<!--<groupId>org.codehaus.groovy</groupId>-->
<!--<artifactId>groovy-all</artifactId>-->
<!--<version>${groovyVersion}</version>-->
<!--</dependency>-->
<!--</dependencies>-->
<!--</plugin>-->
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<!-- any version of Groovy \>= 1.5.0 should work here -->
<version>2.4.7</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>3.0.6-jenkins</version>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>

<dependency>
<groupId>com.orbitz.consul</groupId>
<artifactId>consul-client</artifactId>
<version>0.12.7</version>
</dependency>
<dependency>
<groupId>org.javers</groupId>
<artifactId>javers-core</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>

</project>
Loading