EWD 3 Training Course Part 42: The QEWD Docker Appliance

R
Rob TweedIT Consultant, Developer & Director/Founder at M/Gateway Developments Ltd
Copyright © 2016 M/Gateway Developments Ltd
EWD 3 Training Course
Part 42
The QEWD Docker Appliance
Rob Tweed
Director, M/Gateway Developments Ltd
Twitter: @rtweed
Copyright © 2016 M/Gateway Developments Ltd
Docker?
• A technology that allows software to be
encapsulated inside an isolated container
• According to Docker themselves:
– "Docker containers wrap a piece of software in a
complete filesystem that contains everything needed
to run: code, runtime, system tools, system libraries –
anything that can be installed on a server. This
guarantees that the software will always run the
same, regardless of its environment."
– See https://www.docker.com/what-docker
Copyright © 2016 M/Gateway Developments Ltd
QEWD Docker Container
• QEWD is available from the main docker.io
repository as a pre-built Docker container
– rtweed/qewd
• You can also build your own version using the
Dockerfile that is included in the QEWD
repository
– eg, if you wanted to apply your own customisations
– See https://github.com/robtweed/qewd/blob/master/docker/Dockerfile
Copyright © 2016 M/Gateway Developments Ltd
Benefits of the QEWD Container
• Provided you've installed Docker, you
don't need to do any further installation
– Just run the container
• First time you do this, it will automatically download
it from docker.io
Copyright © 2016 M/Gateway Developments Ltd
Benefits of the QEWD Container
• QEWD functionality without any "moving
parts" on your system
– eg no Node.js dependency clashes
• You don't even need Node.js installed on your
system
– You just define your handler modules
• Write JavaScript files and let the QEWD container
handle them
– Without Node.js having to even be present on your
system
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• Just the core QEWD engine
– Master process
– Worker processes
• Doesn't include the embedded database
– Currently designed to work with Redis only
• Using mapped volumes
– You can use Redis locally, in another
container or remotely
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• Normal QEWD Session management will
take place provided a Redis database is
available
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• Nothing you can do in a standard local
QEWD installation that can't also be
achieved by using the Dockerised version
– There's even a version for the Raspberry Pi!
• rtweed/rpi-qewd
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• "Out of the box" defaults
– Management password: 'keepThisSecret!'
– Worker pool size: 1
– Database: Redis listening on port 6379
• qewd-monitor application is included and
ready to run
– No other applications or APIs pre-defined
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• You can customise the configuration:
– Management password
– Server name (what appears in qewd-monitor's
banner)
– Worker pool size
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• By using Docker volume mapping, you can
make specific directories in your host
system available to the QEWD Docker
container
• In your host system you can therefore
define interactive QEWD applications:
– Static browser-side resources (HTML, JS,
CSS files)
– Back-end handler modules
Copyright © 2016 M/Gateway Developments Ltd
QEWD Appliance
• You can also define routes within your host
system, to be used by the QEWD
Appliance
– For Web / REST service APIs
Copyright © 2016 M/Gateway Developments Ltd
So let's try it out
• I'm going to use a Ubuntu Linux system
• However, Docker can be installed on most
platforms
– Windows
– Linux (all versions/flavours)
– Unix
– MacOS
– Even the Raspberry Pi!
Copyright © 2016 M/Gateway Developments Ltd
Installing Docker on Ubuntu 16.04
• sudo apt-get update
• sudo apt-get install docker.io
• You can now use Docker
– By default, you'll need to run Docker
commands as sudo
– This can be modified. See:
– https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
Copyright © 2016 M/Gateway Developments Ltd
Installing Docker on Raspberry Pi
• Just invoke the command:
curl -sSL https://get.docker.com | sh
• You can now use Docker on your
Raspberry Pi
– By default, you'll need to run Docker
commands as sudo
Copyright © 2016 M/Gateway Developments Ltd
Some Quick Docker Tests
• Try running these to confirm that Docker is
properly installed and working on your
system:
– sudo docker version
– sudo docker info
Copyright © 2016 M/Gateway Developments Ltd
Let's start a Redis Container
On Linux:
• sudo docker run -d --name redis -p 6379:6379 redis
• Runs as a daemon (-d)
• Exposes internal port 6379 (the default Redis port)
externally to the host as port 6379 (-p)
• First time you invoke this command, it will download and
install the Redis Docker container
Copyright © 2016 M/Gateway Developments Ltd
Let's start a Redis Container
On Raspberry Pi:
• sudo docker run -d --name redis -p 6379:6379 hypriot/rpi-redis
• Runs as a daemon (-d)
• Exposes internal port 6379 (the default Redis port)
externally to the host as port 6379 (-p)
• First time you invoke this command, it will download and
install the Redis Docker container
Copyright © 2016 M/Gateway Developments Ltd
Test Redis
• First install the Redis command line tool:
– sudo apt-get install redis-tools
• Now start the Redis command line:
redis-cli
• It should respond with
127.0.0.1:6379>
– it's working and you're connected to the Redis container!
• Try the command:
info
• Exit redis-cli by typing CTRL&C
Copyright © 2016 M/Gateway Developments Ltd
Prepare for the QEWD Appliance
• First important step:
– Create a directory for mapping the QEWD working
directory
– It can be any directory you like. I'll use:
cd ~
mkdir qewd
– Now make a sub-directory named modules
cd qewd
mkdir modules
• You don't need to put anything into this directory
yet, but it should exist
Copyright © 2016 M/Gateway Developments Ltd
Start the QEWD Appliance
sudo docker run -d -p 8080:8080 --link redis:redis -v /home/ubuntu/qewd/modules:/opt/qewd/mapped rtweed/qewd
First time you invoke this, it will download the QEWD Container from
Docker.io
-p 8080:8080 maps port 8080 in the QEWD container to your host's port 8080
-d run as a daemon. You can also try -it for interactive display
-link redis:redis links to the Redis container
-v maps the QEWD working directory to the one we created
QEWD will now be running!
On Linux:
Copyright © 2016 M/Gateway Developments Ltd
Start the QEWD Appliance
sudo docker run -d -p 8080:8080 --link redis:redis -v /home/pi/qewd/modules:/opt/qewd/mapped rtweed/rpi-qewd
First time you invoke this, it will download the QEWD Container from
Docker.io
-p 8080:8080 maps port 8080 in the QEWD container to your host's port 8080
-d run as a daemon. You can also try -it for interactive display
-link redis:redis links to the Redis container
-v maps the QEWD working directory to the one we created
QEWD will now be running!
On Raspberry Pi:
Copyright © 2016 M/Gateway Developments Ltd
Try QEWD
http://192.168.1.123:8080/qewd-monitor/index.html
Change the IP address / host name as appropriate for your host machine
You should see the qewd-monitor application!
Log in using the default password: keepThisSecret!
Copyright © 2016 M/Gateway Developments Ltd
Let's check Redis again
• Start redis-cli again
• This time enter the command:
– keys *
• You should see a load of Redis key/value
pairs, representing the QEWD Session
global storage used by your qewd-monitor
session
Copyright © 2016 M/Gateway Developments Ltd
Let's build a quick application
• We'll create the files in the ~/qewd
directory that we previously made
Copyright © 2016 M/Gateway Developments Ltd
First, stop the QEWD Container
• Use the qewd-monitor; or
• Use the docker stop command
– To do that we need to first find out the QEWD
container's unique Id
– sudo docker ps -a
CONTAINER ID IMAGE
d810c520894e rtweed/qewd
7d0c18b8cec5 redis
Copyright © 2016 M/Gateway Developments Ltd
First, stop the QEWD Container
• Use the qewd-monitor; or
• Use the docker stop command
– To do that we need to first find out the QEWD
container's unique Id
– sudo docker ps -a
CONTAINER ID IMAGE
d810c520894e rtweed/qewd
7d0c18b8cec5 redis Usually the first
3 characters are
sufficient
Copyright © 2016 M/Gateway Developments Ltd
Stop the QEWD Container
• sudo docker stop d81
Copyright © 2016 M/Gateway Developments Ltd
Create a test application
• We'll name it testapp
– It will have a button which, when clicked,
sends a message to the QEWD back-end
which returns an acknowledgement response
• First create a directory for the browser-
side static files:
cd ~/qewd
mkdir www
cd www
Copyright © 2016 M/Gateway Developments Ltd
Create the index.html
<html>
<head>
<title>Demo QEWD application</title>
</head>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script src="/ewd-client.js"></script>
<script src="app.js"></script>
<button id="testBtn">Click Me</button>
<div id="content">
Content goes here
</div>
</body>
</html> Save as ~/qewd/www/testapp/index.html
Copyright © 2016 M/Gateway Developments Ltd
Create the app.js
Save as ~/qewd/www/testapp/app.js
$(document).ready(function() {
EWD.log = true;
EWD.on('ewd-registered', function() {
$('#testBtn').on('click', function(e) {
var message = {type: 'testButton'};
EWD.send(message, function(messageObj) {
$('#content').text(messageObj.message.ok);
});
});
});
EWD.start('testapp', $, io);
});
Copyright © 2016 M/Gateway Developments Ltd
Create the back-end module
• This needs to go into the directory we
created earlier:
~/qewd/modules
• We'll name the module testapp.js
Copyright © 2016 M/Gateway Developments Ltd
Create testapp.js
module.exports = {
handlers: {
testButton: function(messageObj, session, send, finished) {
console.log('*** handling the button click message!');
session.data.$('foo').value = 'bar';
finished({
ok: 'testButton message was processed successfully!'
});
}
}
};
Save as ~/qewd/modules/testapp.js
Copyright © 2016 M/Gateway Developments Ltd
How will QEWD find the module?
• The QEWD Docker Appliance will expect
to find it in its node_modules directory
• We don't have access to that from the host
• But we've mapped ~/qewd/modules to a
mapped volume in the Docker container:
~/opt/qewd/mapped
Copyright © 2016 M/Gateway Developments Ltd
How will QEWD find the module?
• We can use a QEWD module map to tell
QEWD where to find the back-end module
for our testapp application
• The QEWD Docker appliance allows us to
define this in the mapped volume directory
using the reserved file name:
– moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Create moduleMap.js
module.exports = {
testapp: '/opt/qewd/mapped/testapp'
}
Save as ~/qewd/modules/moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Create moduleMap.js
module.exports = {
testapp: '/opt/qewd/mapped/testapp'
}
The module map exports as many mappings as you want
Save as ~/qewd/modules/moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Create moduleMap.js
module.exports = {
testapp: '/opt/qewd/mapped/testapp'
}
The module map exports as many mappings as you want
We just need this one.
Save as ~/qewd/modules/moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Create moduleMap.js
module.exports = {
testapp: '/opt/qewd/mapped/testapp'
}
Note: the mapped module path is to the internal path
within the container
Save as ~/qewd/modules/moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Create moduleMap.js
module.exports = {
testapp: '/opt/qewd/mapped/testapp'
}
Note: the mapped module path is to the internal path
within the container, not the path we created on the host
~/qewd/modules/testapp.js
Copyright © 2016 M/Gateway Developments Ltd
That should be all we need
• When we start the QEWD Appliance
again, we must also map the directory
containing the browser-side files, ie
– ~/qewd/www/testapp
Copyright © 2016 M/Gateway Developments Ltd
Start the QEWD Appliance
• On Linux:
sudo docker run -d -p 8080:8080 --link redis:redis ↩
-v /home/ubuntu/qewd/modules:/opt/qewd/mapped ↩
-v /home/ubuntu/qewd/www/testapp:/opt/qewd/www/testapp ↩
rtweed/qewd
Copyright © 2016 M/Gateway Developments Ltd
Start the QEWD Appliance
• On Raspberry Pi:
sudo docker run -d -p 8080:8080 --link redis:redis ↩
-v /home/pi/qewd/modules:/opt/qewd/mapped ↩
-v /home/pi/qewd/www/testapp:/opt/qewd/www/testapp ↩
rtweed/rpi-qewd
Copyright © 2016 M/Gateway Developments Ltd
Try running testapp
It works
The console show that
testapp correctly registered
itself on QEWD
Try clicking the button..
Copyright © 2016 M/Gateway Developments Ltd
Try running testapp
It works too!
A message was sent
to the QEWD back-end
which returned the expected
response
Copyright © 2016 M/Gateway Developments Ltd
Check the Session
Start the qewd-monitor application and click the Session tab:
Copyright © 2016 M/Gateway Developments Ltd
Check the Session
Start the qewd-monitor application and click the Session tab:
Where did this come from?
Copyright © 2016 M/Gateway Developments Ltd
It came from testapp.js
module.exports = {
handlers: {
testButton: function(messageObj, session, send, finished) {
console.log('*** handling the button click message!');
session.data.$('foo').value = 'bar';
finished({
ok: 'testButton message was processed successfully!'
});
}
}
};
Save as ~/qewd/modules/testapp.js
Copyright © 2016 M/Gateway Developments Ltd
QEWD Apps with no moving parts!
• We just created a QEWD app without
having anything installed other than
Docker
• We just defined:
– the HTML and JavaScript files for the
browser
– The back-end JavaScript handler module
• And mapped their directories as Docker
volumes
Copyright © 2016 M/Gateway Developments Ltd
Adding more apps
• Each app you create will need its own
subdirectory under the ~/qewd/www directory
– For its browser-side HTML, JavaScript, etc files
– Each of these will have to be mapped to the
corresponding volume in the QEWD container
• Their back-end modules, however, just go into
your mapped ~/qewd/modules folder
– And then define their module mapping in
moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Mapping Multiple Apps
module.exports = {
testapp: '/opt/qewd/mapped/testapp',
mySecondApp: '/opt/qewd/mapped/mySecondApp',
myThirdApp: '/opt/qewd/mapped/myThirdApp'
}
~/qewd/modules/moduleMap.js
Copyright © 2016 M/Gateway Developments Ltd
Mapping Multiple Apps
• eg, On Linux:
sudo docker run -d -p 8080:8080 --link redis:redis ↩
-v /home/ubuntu/qewd/modules:/opt/qewd/mapped ↩
-v /home/ubuntu/qewd/www/testapp:/opt/qewd/www/testapp ↩
-v /home/ubuntu/qewd/www/mySecondApp:/opt/qewd/www/mySecondApp ↩
-v /home/ubuntu/qewd/www/myThirdApp:/opt/qewd/www/myThirdApp ↩
rtweed/qewd
Copyright © 2016 M/Gateway Developments Ltd
What about REST APIs?
• We can use the QEWD Docker Appliance
to very quickly create REST APIs, again
without any moving parts other than
Docker itself
• Even simpler to create than applications
Copyright © 2016 M/Gateway Developments Ltd
Let's create an API
• We'll define a URL path prefix:
– /api
• And handle any lower-level URLs, eg:
– /api/test
• To do this we just need to create a handler
module for the /api path. We'll call it api.js. It
must be saved into the ~/qewd/modules
directory
Copyright © 2016 M/Gateway Developments Ltd
Create api.js
module.exports = {
restModule: true,
handlers: {
test: function(messageObj, finished) {
finished({foo: 'bar'});
}
}
};
Save as ~/qewd/modules/api.js
Copyright © 2016 M/Gateway Developments Ltd
Create api.js
module.exports = {
restModule: true,
handlers: {
test: function(messageObj, finished) {
finished({foo: 'bar'});
}
}
};
Save as ~/qewd/modules/api.js
It's just a standard QEWD REST/Web Service Module
Copyright © 2016 M/Gateway Developments Ltd
Create api.js
module.exports = {
restModule: true,
handlers: {
test: function(messageObj, finished) {
finished({foo: 'bar'});
}
}
};
This function, test, will handle
any incoming /api/test requests
Copyright © 2016 M/Gateway Developments Ltd
QEWD needs to know how to find it
• As we're defining the handler module in a
mapped directory, we need to tell QEWD
where to find it and how to define it as a
route.
• For this we define a reserved named file in
our ~/qewd/modules directory:
– routes.js
Copyright © 2016 M/Gateway Developments Ltd
Create routes.js
module.exports = [
{
path: '/api',
module: '/opt/qewd/mapped/api'
}
];
Save as ~/qewd/modules/routes.js
Copyright © 2016 M/Gateway Developments Ltd
Create routes.js
module.exports = [
{
path: '/api',
module: '/opt/qewd/mapped/api'
}
];
Save as ~/qewd/modules/routes.js
You export an array of route objects
We'll just define one for /api in this example,
but you can define as many routes as you wish
Copyright © 2016 M/Gateway Developments Ltd
Create routes.js
module.exports = [
{
path: '/api',
module: '/opt/qewd/mapped/api'
}
];
Note that the route must map to the container's
internal mapped volume path
So any incoming requests with a URL starting
/api will be handled by the api.js file we've created
in the host's mapped directory
Copyright © 2016 M/Gateway Developments Ltd
Let's try it
• Our handler function isn't making any
distinctions about the HTTP method used,
so we can test it just using a browser.
Copyright © 2016 M/Gateway Developments Ltd
Let's try it
It worked!
Copyright © 2016 M/Gateway Developments Ltd
REST/Web Service APIs
• Of course this was a very simple example
• But you can write as complex APIs as you
wish.
• All the functionality described in parts 31
and 36 of this course are available in the
QEWD Docker Appliance
Copyright © 2016 M/Gateway Developments Ltd
REST APIs without moving parts
• You can now define Web/REST APIs by
writing JavaScript handler module files
• No need to install Node.js
Copyright © 2016 M/Gateway Developments Ltd
Customising QEWD Appliance
• QEWD Docker Appliance defaults:
– Management password: keepThisSecret!
• Always a good idea to change this!
– Server name: QEWD Docker Server
• Used by the qewd-monitor application
– Worker pool size: 1
• You can change these
Copyright © 2016 M/Gateway Developments Ltd
Customising QEWD Appliance
• Create a file named custom.js in your
mapped directory (eg ~/qewd/mapped)
– custom.js is a reserved name that the QEWD
Docker Appliance will look for and use for
customising its configuration
Copyright © 2016 M/Gateway Developments Ltd
Create custom.js
module.exports = {
config: {
managementPassword: 'mySecret!',
serverName: 'Robs QEWD Docker Appliance',
poolSize: 2
}
};
Save as ~/qewd/modules/custom.js
Copyright © 2016 M/Gateway Developments Ltd
Restart the Appliance
• eg:
– sudo docker restart d81
• Try running qewd-monitor
– You'll need to use your new custom login
password
– It will display the new name for your server
– It will show 2 worker processes
Copyright © 2016 M/Gateway Developments Ltd
Further Customisation
• You can get access to the master process
objects:
– Create user defined data / objects that are
passed to worker processes
– Access the ewd-qoper8 object
– Access the Express object
• Define a run function. This is invoked
when QEWD starts.
Copyright © 2016 M/Gateway Developments Ltd
Create custom.js
function customise(config, q, intercept) {
console.log('*** This is the custom function calling!');
}
module.exports = {
config: {
run: customise,
managementPassword: 'mySecret!',
serverName: 'Robs QEWD Docker Appliance',
poolSize: 2
}
};
Save as ~/qewd/modules/custom.js
Copyright © 2016 M/Gateway Developments Ltd
Create custom.js
function customise(config, q, intercept) {
console.log('*** This is the custom function calling!');
}
module.exports = {
config: {
run: customise,
managementPassword: 'mySecret!',
serverName: 'Robs QEWD Docker Appliance',
poolSize: 2
}
}; q is the main ewd-qoper8 object
intercept.app is the Express object
allowing you to add custom middleware
Copyright © 2016 M/Gateway Developments Ltd
That's the QEWD Docker Appliance
• A handy and simple, low-impact way of
using QEWD without worrying about
interactions with your existing set-up
– And without having to install Node.js or a
database
• All the functionality of a standard local
implementation of QEWD is still available
to you
1 of 73

Recommended

EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS by
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSEWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPSRob Tweed
608 views6 slides
EWD 3 Training Course Part 19: The cache.node APIs by
EWD 3 Training Course Part 19: The cache.node APIsEWD 3 Training Course Part 19: The cache.node APIs
EWD 3 Training Course Part 19: The cache.node APIsRob Tweed
905 views50 slides
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle by
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleEWD 3 Training Course Part 8: Anatomy of the QEWD Messaging Cycle
EWD 3 Training Course Part 8: Anatomy of the QEWD Messaging CycleRob Tweed
720 views20 slides
qewd-ripple: The Ripple OSI Middle Tier by
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle TierRob Tweed
720 views52 slides
EWD 3 Training Course Part 35: QEWD Session Locking by
EWD 3 Training Course Part 35: QEWD Session LockingEWD 3 Training Course Part 35: QEWD Session Locking
EWD 3 Training Course Part 35: QEWD Session LockingRob Tweed
532 views10 slides
EWD 3 Training Course Part 4: Installing & Configuring QEWD by
EWD 3 Training Course Part 4: Installing & Configuring QEWDEWD 3 Training Course Part 4: Installing & Configuring QEWD
EWD 3 Training Course Part 4: Installing & Configuring QEWDRob Tweed
2.9K views31 slides

More Related Content

What's hot

EWD 3 Training Course Part 29: Running QEWD as a Service by
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a ServiceRob Tweed
1K views25 slides
EWD 3 Training Course Part 34: QEWD Resilient Mode by
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient ModeRob Tweed
750 views20 slides
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services by
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST ServicesRob Tweed
333 views37 slides
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data... by
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...Rob Tweed
3.9K views32 slides
EWD 3 Training Course Part 12: QEWD Session Timeout Control by
EWD 3 Training Course Part 12: QEWD Session Timeout ControlEWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout ControlRob Tweed
561 views8 slides
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres... by
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...Rob Tweed
1.1K views53 slides

What's hot(20)

EWD 3 Training Course Part 29: Running QEWD as a Service by Rob Tweed
EWD 3 Training Course Part 29: Running QEWD as a ServiceEWD 3 Training Course Part 29: Running QEWD as a Service
EWD 3 Training Course Part 29: Running QEWD as a Service
Rob Tweed1K views
EWD 3 Training Course Part 34: QEWD Resilient Mode by Rob Tweed
EWD 3 Training Course Part 34: QEWD Resilient ModeEWD 3 Training Course Part 34: QEWD Resilient Mode
EWD 3 Training Course Part 34: QEWD Resilient Mode
Rob Tweed750 views
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services by Rob Tweed
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Servicesewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
Rob Tweed333 views
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data... by Rob Tweed
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
EWD 3 Training Course Part 1: How Node.js Integrates With Global Storage Data...
Rob Tweed3.9K views
EWD 3 Training Course Part 12: QEWD Session Timeout Control by Rob Tweed
EWD 3 Training Course Part 12: QEWD Session Timeout ControlEWD 3 Training Course Part 12: QEWD Session Timeout Control
EWD 3 Training Course Part 12: QEWD Session Timeout Control
Rob Tweed561 views
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres... by Rob Tweed
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
Rob Tweed1.1K views
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality by Rob Tweed
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService FunctionalityEWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
Rob Tweed2.1K views
QEWD.js: Have your Node.js Cake and Eat It Too by Rob Tweed
QEWD.js: Have your Node.js Cake and Eat It TooQEWD.js: Have your Node.js Cake and Eat It Too
QEWD.js: Have your Node.js Cake and Eat It Too
Rob Tweed628 views
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js by Rob Tweed
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.jsEWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
Rob Tweed1.5K views
EWD 3 Training Course Part 2: EWD 3 Overview by Rob Tweed
EWD 3 Training Course Part 2: EWD 3 OverviewEWD 3 Training Course Part 2: EWD 3 Overview
EWD 3 Training Course Part 2: EWD 3 Overview
Rob Tweed2.1K views
EWD 3 Training Course Part 33: Configuring QEWD to use CORS by Rob Tweed
EWD 3 Training Course Part 33: Configuring QEWD to use CORSEWD 3 Training Course Part 33: Configuring QEWD to use CORS
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
Rob Tweed1.1K views
QEWD.js, JSON Web Tokens & MicroServices by Rob Tweed
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
Rob Tweed903 views
LNUG: Having Your Node.js Cake and Eating It Too by Rob Tweed
LNUG: Having Your Node.js Cake and Eating It TooLNUG: Having Your Node.js Cake and Eating It Too
LNUG: Having Your Node.js Cake and Eating It Too
Rob Tweed2.8K views
Kubernetes Story - Day 1: Build and Manage Containers with Podman by Mihai Criveti
Kubernetes Story - Day 1: Build and Manage Containers with PodmanKubernetes Story - Day 1: Build and Manage Containers with Podman
Kubernetes Story - Day 1: Build and Manage Containers with Podman
Mihai Criveti177 views
QEWD Update by Rob Tweed
QEWD UpdateQEWD Update
QEWD Update
Rob Tweed945 views
Containerizing a Web Application with Vue.js and Java by Jadson Santos
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and Java
Jadson Santos346 views
Docker session IV: Docker Compose and Docker Swarm by Degendra Sivakoti
Docker session IV: Docker Compose and Docker SwarmDocker session IV: Docker Compose and Docker Swarm
Docker session IV: Docker Compose and Docker Swarm
Degendra Sivakoti183 views
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift by Mihai Criveti
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShiftKubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Kubernetes Story - Day 3: Deploying and Scaling Applications on OpenShift
Mihai Criveti144 views
Warden @ Meet magento Romania 2021 by alinalexandru
Warden @ Meet magento Romania 2021Warden @ Meet magento Romania 2021
Warden @ Meet magento Romania 2021
alinalexandru38 views
Node js training (1) by Ashish Gupta
Node js training (1)Node js training (1)
Node js training (1)
Ashish Gupta113 views

Viewers also liked

EWD 3 Training Course Part 26: Event-driven Indexing by
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven IndexingRob Tweed
678 views14 slides
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services by
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesRob Tweed
3.3K views154 slides
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes by
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesRob Tweed
622 views19 slides
EWD 3 Training Course Part 25: Document Database Capabilities by
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database CapabilitiesRob Tweed
905 views49 slides
EWD 3 Training Course Part 21: Persistent JavaScript Objects by
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsEWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsRob Tweed
779 views31 slides
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application by
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationRob Tweed
1.4K views33 slides

Viewers also liked(15)

EWD 3 Training Course Part 26: Event-driven Indexing by Rob Tweed
EWD 3 Training Course Part 26: Event-driven IndexingEWD 3 Training Course Part 26: Event-driven Indexing
EWD 3 Training Course Part 26: Event-driven Indexing
Rob Tweed678 views
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services by Rob Tweed
EWD 3 Training Course Part 31: Using QEWD for Web and REST ServicesEWD 3 Training Course Part 31: Using QEWD for Web and REST Services
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
Rob Tweed3.3K views
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes by Rob Tweed
EWD 3 Training Course Part 24: Traversing a Document's Leaf NodesEWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
Rob Tweed622 views
EWD 3 Training Course Part 25: Document Database Capabilities by Rob Tweed
EWD 3 Training Course Part 25: Document Database CapabilitiesEWD 3 Training Course Part 25: Document Database Capabilities
EWD 3 Training Course Part 25: Document Database Capabilities
Rob Tweed905 views
EWD 3 Training Course Part 21: Persistent JavaScript Objects by Rob Tweed
EWD 3 Training Course Part 21: Persistent JavaScript ObjectsEWD 3 Training Course Part 21: Persistent JavaScript Objects
EWD 3 Training Course Part 21: Persistent JavaScript Objects
Rob Tweed779 views
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application by Rob Tweed
EWD 3 Training Course Part 5a: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
Rob Tweed1.4K views
EWD 3 Training Course Part 20: The DocumentNode Object by Rob Tweed
EWD 3 Training Course Part 20: The DocumentNode ObjectEWD 3 Training Course Part 20: The DocumentNode Object
EWD 3 Training Course Part 20: The DocumentNode Object
Rob Tweed1K views
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application by Rob Tweed
EWD 3 Training Course Part 5b: First Steps in Building a QEWD ApplicationEWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
Rob Tweed999 views
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3 by Rob Tweed
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
Rob Tweed627 views
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4 by Rob Tweed
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 4
Rob Tweed718 views
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects by Rob Tweed
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode ObjectsEWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
Rob Tweed732 views
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2 by Rob Tweed
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
EWD 3 Training Course Part 38: Building a React.js application with QEWD, Part 2
Rob Tweed597 views
EWD 3 Training Course Part 27: The QEWD Session by Rob Tweed
EWD 3 Training Course Part 27: The QEWD SessionEWD 3 Training Course Part 27: The QEWD Session
EWD 3 Training Course Part 27: The QEWD Session
Rob Tweed920 views
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap... by Rob Tweed
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
Rob Tweed932 views
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5 by Rob Tweed
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed621 views

Similar to EWD 3 Training Course Part 42: The QEWD Docker Appliance

Docker fundamentals by
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
662 views97 slides
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins by
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
316 views44 slides
Deploying Windows Containers on Windows Server 2016 by
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
2.4K views82 slides
From Docker to Production - ZendCon 2016 by
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016Chris Tankersley
399 views59 slides
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints by
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context ConstraintsAlessandro Arrichiello
2.3K views37 slides
Docker 101 @KACST Saudi HPC 2016 by
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016Walid Shaari
5.2K views59 slides

Similar to EWD 3 Training Course Part 42: The QEWD Docker Appliance(20)

Docker fundamentals by Alper Unal
Docker fundamentalsDocker fundamentals
Docker fundamentals
Alper Unal662 views
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins by Mando Stam
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam316 views
Deploying Windows Containers on Windows Server 2016 by Ben Hall
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
Ben Hall2.4K views
From Docker to Production - ZendCon 2016 by Chris Tankersley
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016
Chris Tankersley399 views
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints by Alessandro Arrichiello
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
Docker 101 @KACST Saudi HPC 2016 by Walid Shaari
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
Walid Shaari5.2K views
Docker workshop by Evans Ye
Docker workshopDocker workshop
Docker workshop
Evans Ye2K views
Docker engine - Indroduc by Al Gifari
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
Al Gifari377 views
VMware@Night Container and Virtualization by Opvizor, Inc.
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
Opvizor, Inc.399 views
Deploy django apps using docker by Thomas Kremmel
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
Thomas Kremmel1.1K views
Killer Docker Workflows for Development by Chris Tankersley
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
Chris Tankersley159 views
Developing and Deploying PHP with Docker by Patrick Mizer
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
Patrick Mizer807 views
Containerizing Web Application with Docker by msyukor
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
msyukor509 views
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins by ElasTest Project
ExpoQA 2017 Using docker to build and test in your laptop and JenkinsExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ExpoQA 2017 Using docker to build and test in your laptop and Jenkins
ElasTest Project355 views

Recently uploaded

DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... by
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...Deltares
9 views26 slides
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...Marc Müller
38 views62 slides
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDeltares
17 views13 slides
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
13 views19 slides
Fleet Management Software in India by
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India Fleetable
11 views1 slide
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...Deltares
13 views34 slides

Recently uploaded(20)

DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t... by Deltares
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
DSD-INT 2023 Thermobaricity in 3D DCSM-FM - taking pressure into account in t...
Deltares9 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views
Fleet Management Software in India by Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 views
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... by Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 views
Cycleops - Automate deployments on top of bare metal.pptx by Thanassis Parathyras
Cycleops - Automate deployments on top of bare metal.pptxCycleops - Automate deployments on top of bare metal.pptx
Cycleops - Automate deployments on top of bare metal.pptx
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri711 views
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM... by Deltares
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
Deltares7 views
MariaDB stored procedures and why they should be improved by Federico Razzoli
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove... by Deltares
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
DSD-INT 2023 HydroMT model building and river-coast coupling in Python - Bove...
Deltares17 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...

EWD 3 Training Course Part 42: The QEWD Docker Appliance

  • 1. Copyright © 2016 M/Gateway Developments Ltd EWD 3 Training Course Part 42 The QEWD Docker Appliance Rob Tweed Director, M/Gateway Developments Ltd Twitter: @rtweed
  • 2. Copyright © 2016 M/Gateway Developments Ltd Docker? • A technology that allows software to be encapsulated inside an isolated container • According to Docker themselves: – "Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment." – See https://www.docker.com/what-docker
  • 3. Copyright © 2016 M/Gateway Developments Ltd QEWD Docker Container • QEWD is available from the main docker.io repository as a pre-built Docker container – rtweed/qewd • You can also build your own version using the Dockerfile that is included in the QEWD repository – eg, if you wanted to apply your own customisations – See https://github.com/robtweed/qewd/blob/master/docker/Dockerfile
  • 4. Copyright © 2016 M/Gateway Developments Ltd Benefits of the QEWD Container • Provided you've installed Docker, you don't need to do any further installation – Just run the container • First time you do this, it will automatically download it from docker.io
  • 5. Copyright © 2016 M/Gateway Developments Ltd Benefits of the QEWD Container • QEWD functionality without any "moving parts" on your system – eg no Node.js dependency clashes • You don't even need Node.js installed on your system – You just define your handler modules • Write JavaScript files and let the QEWD container handle them – Without Node.js having to even be present on your system
  • 6. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • Just the core QEWD engine – Master process – Worker processes • Doesn't include the embedded database – Currently designed to work with Redis only • Using mapped volumes – You can use Redis locally, in another container or remotely
  • 7. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • Normal QEWD Session management will take place provided a Redis database is available
  • 8. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • Nothing you can do in a standard local QEWD installation that can't also be achieved by using the Dockerised version – There's even a version for the Raspberry Pi! • rtweed/rpi-qewd
  • 9. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • "Out of the box" defaults – Management password: 'keepThisSecret!' – Worker pool size: 1 – Database: Redis listening on port 6379 • qewd-monitor application is included and ready to run – No other applications or APIs pre-defined
  • 10. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • You can customise the configuration: – Management password – Server name (what appears in qewd-monitor's banner) – Worker pool size
  • 11. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • By using Docker volume mapping, you can make specific directories in your host system available to the QEWD Docker container • In your host system you can therefore define interactive QEWD applications: – Static browser-side resources (HTML, JS, CSS files) – Back-end handler modules
  • 12. Copyright © 2016 M/Gateway Developments Ltd QEWD Appliance • You can also define routes within your host system, to be used by the QEWD Appliance – For Web / REST service APIs
  • 13. Copyright © 2016 M/Gateway Developments Ltd So let's try it out • I'm going to use a Ubuntu Linux system • However, Docker can be installed on most platforms – Windows – Linux (all versions/flavours) – Unix – MacOS – Even the Raspberry Pi!
  • 14. Copyright © 2016 M/Gateway Developments Ltd Installing Docker on Ubuntu 16.04 • sudo apt-get update • sudo apt-get install docker.io • You can now use Docker – By default, you'll need to run Docker commands as sudo – This can be modified. See: – https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
  • 15. Copyright © 2016 M/Gateway Developments Ltd Installing Docker on Raspberry Pi • Just invoke the command: curl -sSL https://get.docker.com | sh • You can now use Docker on your Raspberry Pi – By default, you'll need to run Docker commands as sudo
  • 16. Copyright © 2016 M/Gateway Developments Ltd Some Quick Docker Tests • Try running these to confirm that Docker is properly installed and working on your system: – sudo docker version – sudo docker info
  • 17. Copyright © 2016 M/Gateway Developments Ltd Let's start a Redis Container On Linux: • sudo docker run -d --name redis -p 6379:6379 redis • Runs as a daemon (-d) • Exposes internal port 6379 (the default Redis port) externally to the host as port 6379 (-p) • First time you invoke this command, it will download and install the Redis Docker container
  • 18. Copyright © 2016 M/Gateway Developments Ltd Let's start a Redis Container On Raspberry Pi: • sudo docker run -d --name redis -p 6379:6379 hypriot/rpi-redis • Runs as a daemon (-d) • Exposes internal port 6379 (the default Redis port) externally to the host as port 6379 (-p) • First time you invoke this command, it will download and install the Redis Docker container
  • 19. Copyright © 2016 M/Gateway Developments Ltd Test Redis • First install the Redis command line tool: – sudo apt-get install redis-tools • Now start the Redis command line: redis-cli • It should respond with 127.0.0.1:6379> – it's working and you're connected to the Redis container! • Try the command: info • Exit redis-cli by typing CTRL&C
  • 20. Copyright © 2016 M/Gateway Developments Ltd Prepare for the QEWD Appliance • First important step: – Create a directory for mapping the QEWD working directory – It can be any directory you like. I'll use: cd ~ mkdir qewd – Now make a sub-directory named modules cd qewd mkdir modules • You don't need to put anything into this directory yet, but it should exist
  • 21. Copyright © 2016 M/Gateway Developments Ltd Start the QEWD Appliance sudo docker run -d -p 8080:8080 --link redis:redis -v /home/ubuntu/qewd/modules:/opt/qewd/mapped rtweed/qewd First time you invoke this, it will download the QEWD Container from Docker.io -p 8080:8080 maps port 8080 in the QEWD container to your host's port 8080 -d run as a daemon. You can also try -it for interactive display -link redis:redis links to the Redis container -v maps the QEWD working directory to the one we created QEWD will now be running! On Linux:
  • 22. Copyright © 2016 M/Gateway Developments Ltd Start the QEWD Appliance sudo docker run -d -p 8080:8080 --link redis:redis -v /home/pi/qewd/modules:/opt/qewd/mapped rtweed/rpi-qewd First time you invoke this, it will download the QEWD Container from Docker.io -p 8080:8080 maps port 8080 in the QEWD container to your host's port 8080 -d run as a daemon. You can also try -it for interactive display -link redis:redis links to the Redis container -v maps the QEWD working directory to the one we created QEWD will now be running! On Raspberry Pi:
  • 23. Copyright © 2016 M/Gateway Developments Ltd Try QEWD http://192.168.1.123:8080/qewd-monitor/index.html Change the IP address / host name as appropriate for your host machine You should see the qewd-monitor application! Log in using the default password: keepThisSecret!
  • 24. Copyright © 2016 M/Gateway Developments Ltd Let's check Redis again • Start redis-cli again • This time enter the command: – keys * • You should see a load of Redis key/value pairs, representing the QEWD Session global storage used by your qewd-monitor session
  • 25. Copyright © 2016 M/Gateway Developments Ltd Let's build a quick application • We'll create the files in the ~/qewd directory that we previously made
  • 26. Copyright © 2016 M/Gateway Developments Ltd First, stop the QEWD Container • Use the qewd-monitor; or • Use the docker stop command – To do that we need to first find out the QEWD container's unique Id – sudo docker ps -a CONTAINER ID IMAGE d810c520894e rtweed/qewd 7d0c18b8cec5 redis
  • 27. Copyright © 2016 M/Gateway Developments Ltd First, stop the QEWD Container • Use the qewd-monitor; or • Use the docker stop command – To do that we need to first find out the QEWD container's unique Id – sudo docker ps -a CONTAINER ID IMAGE d810c520894e rtweed/qewd 7d0c18b8cec5 redis Usually the first 3 characters are sufficient
  • 28. Copyright © 2016 M/Gateway Developments Ltd Stop the QEWD Container • sudo docker stop d81
  • 29. Copyright © 2016 M/Gateway Developments Ltd Create a test application • We'll name it testapp – It will have a button which, when clicked, sends a message to the QEWD back-end which returns an acknowledgement response • First create a directory for the browser- side static files: cd ~/qewd mkdir www cd www
  • 30. Copyright © 2016 M/Gateway Developments Ltd Create the index.html <html> <head> <title>Demo QEWD application</title> </head> <body> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script src="/socket.io/socket.io.js"></script> <script src="/ewd-client.js"></script> <script src="app.js"></script> <button id="testBtn">Click Me</button> <div id="content"> Content goes here </div> </body> </html> Save as ~/qewd/www/testapp/index.html
  • 31. Copyright © 2016 M/Gateway Developments Ltd Create the app.js Save as ~/qewd/www/testapp/app.js $(document).ready(function() { EWD.log = true; EWD.on('ewd-registered', function() { $('#testBtn').on('click', function(e) { var message = {type: 'testButton'}; EWD.send(message, function(messageObj) { $('#content').text(messageObj.message.ok); }); }); }); EWD.start('testapp', $, io); });
  • 32. Copyright © 2016 M/Gateway Developments Ltd Create the back-end module • This needs to go into the directory we created earlier: ~/qewd/modules • We'll name the module testapp.js
  • 33. Copyright © 2016 M/Gateway Developments Ltd Create testapp.js module.exports = { handlers: { testButton: function(messageObj, session, send, finished) { console.log('*** handling the button click message!'); session.data.$('foo').value = 'bar'; finished({ ok: 'testButton message was processed successfully!' }); } } }; Save as ~/qewd/modules/testapp.js
  • 34. Copyright © 2016 M/Gateway Developments Ltd How will QEWD find the module? • The QEWD Docker Appliance will expect to find it in its node_modules directory • We don't have access to that from the host • But we've mapped ~/qewd/modules to a mapped volume in the Docker container: ~/opt/qewd/mapped
  • 35. Copyright © 2016 M/Gateway Developments Ltd How will QEWD find the module? • We can use a QEWD module map to tell QEWD where to find the back-end module for our testapp application • The QEWD Docker appliance allows us to define this in the mapped volume directory using the reserved file name: – moduleMap.js
  • 36. Copyright © 2016 M/Gateway Developments Ltd Create moduleMap.js module.exports = { testapp: '/opt/qewd/mapped/testapp' } Save as ~/qewd/modules/moduleMap.js
  • 37. Copyright © 2016 M/Gateway Developments Ltd Create moduleMap.js module.exports = { testapp: '/opt/qewd/mapped/testapp' } The module map exports as many mappings as you want Save as ~/qewd/modules/moduleMap.js
  • 38. Copyright © 2016 M/Gateway Developments Ltd Create moduleMap.js module.exports = { testapp: '/opt/qewd/mapped/testapp' } The module map exports as many mappings as you want We just need this one. Save as ~/qewd/modules/moduleMap.js
  • 39. Copyright © 2016 M/Gateway Developments Ltd Create moduleMap.js module.exports = { testapp: '/opt/qewd/mapped/testapp' } Note: the mapped module path is to the internal path within the container Save as ~/qewd/modules/moduleMap.js
  • 40. Copyright © 2016 M/Gateway Developments Ltd Create moduleMap.js module.exports = { testapp: '/opt/qewd/mapped/testapp' } Note: the mapped module path is to the internal path within the container, not the path we created on the host ~/qewd/modules/testapp.js
  • 41. Copyright © 2016 M/Gateway Developments Ltd That should be all we need • When we start the QEWD Appliance again, we must also map the directory containing the browser-side files, ie – ~/qewd/www/testapp
  • 42. Copyright © 2016 M/Gateway Developments Ltd Start the QEWD Appliance • On Linux: sudo docker run -d -p 8080:8080 --link redis:redis ↩ -v /home/ubuntu/qewd/modules:/opt/qewd/mapped ↩ -v /home/ubuntu/qewd/www/testapp:/opt/qewd/www/testapp ↩ rtweed/qewd
  • 43. Copyright © 2016 M/Gateway Developments Ltd Start the QEWD Appliance • On Raspberry Pi: sudo docker run -d -p 8080:8080 --link redis:redis ↩ -v /home/pi/qewd/modules:/opt/qewd/mapped ↩ -v /home/pi/qewd/www/testapp:/opt/qewd/www/testapp ↩ rtweed/rpi-qewd
  • 44. Copyright © 2016 M/Gateway Developments Ltd Try running testapp It works The console show that testapp correctly registered itself on QEWD Try clicking the button..
  • 45. Copyright © 2016 M/Gateway Developments Ltd Try running testapp It works too! A message was sent to the QEWD back-end which returned the expected response
  • 46. Copyright © 2016 M/Gateway Developments Ltd Check the Session Start the qewd-monitor application and click the Session tab:
  • 47. Copyright © 2016 M/Gateway Developments Ltd Check the Session Start the qewd-monitor application and click the Session tab: Where did this come from?
  • 48. Copyright © 2016 M/Gateway Developments Ltd It came from testapp.js module.exports = { handlers: { testButton: function(messageObj, session, send, finished) { console.log('*** handling the button click message!'); session.data.$('foo').value = 'bar'; finished({ ok: 'testButton message was processed successfully!' }); } } }; Save as ~/qewd/modules/testapp.js
  • 49. Copyright © 2016 M/Gateway Developments Ltd QEWD Apps with no moving parts! • We just created a QEWD app without having anything installed other than Docker • We just defined: – the HTML and JavaScript files for the browser – The back-end JavaScript handler module • And mapped their directories as Docker volumes
  • 50. Copyright © 2016 M/Gateway Developments Ltd Adding more apps • Each app you create will need its own subdirectory under the ~/qewd/www directory – For its browser-side HTML, JavaScript, etc files – Each of these will have to be mapped to the corresponding volume in the QEWD container • Their back-end modules, however, just go into your mapped ~/qewd/modules folder – And then define their module mapping in moduleMap.js
  • 51. Copyright © 2016 M/Gateway Developments Ltd Mapping Multiple Apps module.exports = { testapp: '/opt/qewd/mapped/testapp', mySecondApp: '/opt/qewd/mapped/mySecondApp', myThirdApp: '/opt/qewd/mapped/myThirdApp' } ~/qewd/modules/moduleMap.js
  • 52. Copyright © 2016 M/Gateway Developments Ltd Mapping Multiple Apps • eg, On Linux: sudo docker run -d -p 8080:8080 --link redis:redis ↩ -v /home/ubuntu/qewd/modules:/opt/qewd/mapped ↩ -v /home/ubuntu/qewd/www/testapp:/opt/qewd/www/testapp ↩ -v /home/ubuntu/qewd/www/mySecondApp:/opt/qewd/www/mySecondApp ↩ -v /home/ubuntu/qewd/www/myThirdApp:/opt/qewd/www/myThirdApp ↩ rtweed/qewd
  • 53. Copyright © 2016 M/Gateway Developments Ltd What about REST APIs? • We can use the QEWD Docker Appliance to very quickly create REST APIs, again without any moving parts other than Docker itself • Even simpler to create than applications
  • 54. Copyright © 2016 M/Gateway Developments Ltd Let's create an API • We'll define a URL path prefix: – /api • And handle any lower-level URLs, eg: – /api/test • To do this we just need to create a handler module for the /api path. We'll call it api.js. It must be saved into the ~/qewd/modules directory
  • 55. Copyright © 2016 M/Gateway Developments Ltd Create api.js module.exports = { restModule: true, handlers: { test: function(messageObj, finished) { finished({foo: 'bar'}); } } }; Save as ~/qewd/modules/api.js
  • 56. Copyright © 2016 M/Gateway Developments Ltd Create api.js module.exports = { restModule: true, handlers: { test: function(messageObj, finished) { finished({foo: 'bar'}); } } }; Save as ~/qewd/modules/api.js It's just a standard QEWD REST/Web Service Module
  • 57. Copyright © 2016 M/Gateway Developments Ltd Create api.js module.exports = { restModule: true, handlers: { test: function(messageObj, finished) { finished({foo: 'bar'}); } } }; This function, test, will handle any incoming /api/test requests
  • 58. Copyright © 2016 M/Gateway Developments Ltd QEWD needs to know how to find it • As we're defining the handler module in a mapped directory, we need to tell QEWD where to find it and how to define it as a route. • For this we define a reserved named file in our ~/qewd/modules directory: – routes.js
  • 59. Copyright © 2016 M/Gateway Developments Ltd Create routes.js module.exports = [ { path: '/api', module: '/opt/qewd/mapped/api' } ]; Save as ~/qewd/modules/routes.js
  • 60. Copyright © 2016 M/Gateway Developments Ltd Create routes.js module.exports = [ { path: '/api', module: '/opt/qewd/mapped/api' } ]; Save as ~/qewd/modules/routes.js You export an array of route objects We'll just define one for /api in this example, but you can define as many routes as you wish
  • 61. Copyright © 2016 M/Gateway Developments Ltd Create routes.js module.exports = [ { path: '/api', module: '/opt/qewd/mapped/api' } ]; Note that the route must map to the container's internal mapped volume path So any incoming requests with a URL starting /api will be handled by the api.js file we've created in the host's mapped directory
  • 62. Copyright © 2016 M/Gateway Developments Ltd Let's try it • Our handler function isn't making any distinctions about the HTTP method used, so we can test it just using a browser.
  • 63. Copyright © 2016 M/Gateway Developments Ltd Let's try it It worked!
  • 64. Copyright © 2016 M/Gateway Developments Ltd REST/Web Service APIs • Of course this was a very simple example • But you can write as complex APIs as you wish. • All the functionality described in parts 31 and 36 of this course are available in the QEWD Docker Appliance
  • 65. Copyright © 2016 M/Gateway Developments Ltd REST APIs without moving parts • You can now define Web/REST APIs by writing JavaScript handler module files • No need to install Node.js
  • 66. Copyright © 2016 M/Gateway Developments Ltd Customising QEWD Appliance • QEWD Docker Appliance defaults: – Management password: keepThisSecret! • Always a good idea to change this! – Server name: QEWD Docker Server • Used by the qewd-monitor application – Worker pool size: 1 • You can change these
  • 67. Copyright © 2016 M/Gateway Developments Ltd Customising QEWD Appliance • Create a file named custom.js in your mapped directory (eg ~/qewd/mapped) – custom.js is a reserved name that the QEWD Docker Appliance will look for and use for customising its configuration
  • 68. Copyright © 2016 M/Gateway Developments Ltd Create custom.js module.exports = { config: { managementPassword: 'mySecret!', serverName: 'Robs QEWD Docker Appliance', poolSize: 2 } }; Save as ~/qewd/modules/custom.js
  • 69. Copyright © 2016 M/Gateway Developments Ltd Restart the Appliance • eg: – sudo docker restart d81 • Try running qewd-monitor – You'll need to use your new custom login password – It will display the new name for your server – It will show 2 worker processes
  • 70. Copyright © 2016 M/Gateway Developments Ltd Further Customisation • You can get access to the master process objects: – Create user defined data / objects that are passed to worker processes – Access the ewd-qoper8 object – Access the Express object • Define a run function. This is invoked when QEWD starts.
  • 71. Copyright © 2016 M/Gateway Developments Ltd Create custom.js function customise(config, q, intercept) { console.log('*** This is the custom function calling!'); } module.exports = { config: { run: customise, managementPassword: 'mySecret!', serverName: 'Robs QEWD Docker Appliance', poolSize: 2 } }; Save as ~/qewd/modules/custom.js
  • 72. Copyright © 2016 M/Gateway Developments Ltd Create custom.js function customise(config, q, intercept) { console.log('*** This is the custom function calling!'); } module.exports = { config: { run: customise, managementPassword: 'mySecret!', serverName: 'Robs QEWD Docker Appliance', poolSize: 2 } }; q is the main ewd-qoper8 object intercept.app is the Express object allowing you to add custom middleware
  • 73. Copyright © 2016 M/Gateway Developments Ltd That's the QEWD Docker Appliance • A handy and simple, low-impact way of using QEWD without worrying about interactions with your existing set-up – And without having to install Node.js or a database • All the functionality of a standard local implementation of QEWD is still available to you