Skip to content

Commit

Permalink
First part of presentation and demo files
Browse files Browse the repository at this point in the history
  • Loading branch information
josdirksen committed Apr 11, 2016
0 parents commit cac1bfe
Show file tree
Hide file tree
Showing 115 changed files with 20,339 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.idea
main
<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="GOPATH &lt;nextbuild-consul&gt;" level="project" />
</component>
</module>
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM golang:latest
COPY src/ /go/src/
COPY resources/ /resources/
EXPOSE 8080

WORKDIR src
RUN go build -o /app/main github.com/josdirksen/systeminfo/main.go
WORKDIR /

CMD ["/app/main"]
Empty file added README.md
Empty file.
34 changes: 34 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: '2'

services:
backend-1:
image: nb-backend
container_name: Backend1
ports:
- 8080:8080
environment:
- "constraint:node==nb1"
- SERVERNAME=Server1

backend-2:
image: nb-backend
container_name: Backend2
ports:
- 8080:8080
environment:
- "constraint:node==nb2"
- SERVERNAME=Server2

backend-3:
image: nb-backend
container_name: Backend3
ports:
- 8080:8080
environment:
- "constraint:node==nb3"
- SERVERNAME=Server3

networks:
default:
external:
name: my-net
10 changes: 10 additions & 0 deletions nextbuild-consul.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="GOPATH &lt;nextbuild-consul&gt;" level="project" />
</component>
</module>
Binary file added pres/images/2-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/3-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/microservices-hipsters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/n-layer-container.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/n-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/nb-consul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/images/registry-discovery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pres/nb-consul.sdxml
Binary file not shown.
69 changes: 69 additions & 0 deletions pres/next-build-consul.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Service Discovery in a [Microservice]() Architecture using [Consul]()



## Who Am I

* Currently doing Devops, Scala stuff
* At Equeris, lean startup within Equens
* Docker, Consul, Scala, Cloud and other buzzwords.
* Email me at: [jos.dirksen@gmail.com](mailto:jos.dirksen@gmail.com)
* I write at: http://www.smartjava.org
* Twitter: [@josdirksen](http://www.twitter.com/josdirksen)



## Microservices?

![alt text](../images/microservices-hipsters.png )



### What are microservices?

* Small, fine-grained easy to replace components.
* Organized around capabilities.
* Different languages and backends (whatever fits best).
* Fault tolerant, resiliant, automated deployements.

> "Small Autonomous services that work together", Sam Newman


### We moved from this...

![alt text](../images/2-layer.png "Logo Title Text 1")



### To this...

![alt text](../images/n-layer.png "Logo Title Text 1")



### Or even this...

![alt text](../images/n-layer-container.png "Logo Title Text 1")



### Running Microservices is hard

* Where is my other service?
* Am I healthy, is the other one healthy?
* Where do I store configuration
* ...

>*["Distributed systems are hard"]()*, says everyone


### What we want...

![alt text](../images/registry-discovery.png "Logo Title Text 1")
* Lightweight and non intrusive
* Simple, so no UUDI or WSRR


### You can use
Binary file added pres/reveal/2-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions pres/reveal/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Contributing

Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**.


### Personal Support
If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).


### Bug Reports
When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested.


### Pull Requests
- Should follow the coding style of the file you work in, most importantly:
- Tabs to indent
- Single-quoted strings
- Should be made towards the **dev branch**
- Should be submitted from a feature/topic branch (not your master)


### Plugins
Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
176 changes: 176 additions & 0 deletions pres/reveal/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/* global module:false */
module.exports = function(grunt) {
var port = grunt.option('port') || 8000;
var base = grunt.option('base') || '.';

// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
banner:
'/*!\n' +
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
' * http://lab.hakim.se/reveal-js\n' +
' * MIT licensed\n' +
' *\n' +
' * Copyright (C) 2015 Hakim El Hattab, http://hakim.se\n' +
' */'
},

qunit: {
files: [ 'test/*.html' ]
},

uglify: {
options: {
banner: '<%= meta.banner %>\n'
},
build: {
src: 'js/reveal.js',
dest: 'js/reveal.min.js'
}
},

sass: {
core: {
files: {
'css/reveal.css': 'css/reveal.scss',
}
},
themes: {
files: [
{
expand: true,
cwd: 'css/theme/source',
src: ['*.scss'],
dest: 'css/theme',
ext: '.css'
}
]
}
},

autoprefixer: {
dist: {
src: 'css/reveal.css'
}
},

cssmin: {
compress: {
files: {
'css/reveal.min.css': [ 'css/reveal.css' ]
}
}
},

jshint: {
options: {
curly: false,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
eqnull: true,
browser: true,
expr: true,
globals: {
head: false,
module: false,
console: false,
unescape: false,
define: false,
exports: false
}
},
files: [ 'Gruntfile.js', 'js/reveal.js' ]
},

connect: {
server: {
options: {
port: port,
base: base,
livereload: true,
open: true
}
}
},

zip: {
'reveal-js-presentation.zip': [
'index.html',
'css/**',
'js/**',
'lib/**',
'images/**',
'plugin/**',
'**.md'
]
},

watch: {
options: {
livereload: true
},
js: {
files: [ 'Gruntfile.js', 'js/reveal.js' ],
tasks: 'js'
},
theme: {
files: [ 'css/theme/source/*.scss', 'css/theme/template/*.scss' ],
tasks: 'css-themes'
},
css: {
files: [ 'css/reveal.scss' ],
tasks: 'css-core'
},
html: {
files: [ 'index.html']
},
markdown: {
files: [ './*.md' ]
}
}

});

// Dependencies
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.loadNpmTasks( 'grunt-sass' );
grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks( 'grunt-autoprefixer' );
grunt.loadNpmTasks( 'grunt-zip' );

// Default task
grunt.registerTask( 'default', [ 'css', 'js' ] );

// JS task
grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] );

// Theme CSS
grunt.registerTask( 'css-themes', [ 'sass:themes' ] );

// Core framework CSS
grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] );

// All CSS
grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] );

// Package presentation to archive
grunt.registerTask( 'package', [ 'default', 'zip' ] );

// Serve presentation locally
grunt.registerTask( 'serve', [ 'connect', 'watch' ] );

// Run tests
grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );

};
19 changes: 19 additions & 0 deletions pres/reveal/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) 2015 Hakim El Hattab, http://hakim.se

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Loading

0 comments on commit cac1bfe

Please sign in to comment.