SlideShare ist ein Scribd-Unternehmen logo
1 von 73
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

Weitere Àhnliche Inhalte

Was ist angesagt?

Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introductionrinnocente
 
NGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX, Inc.
 
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014Netgate
 
Server client-presentation.
Server client-presentation.Server client-presentation.
Server client-presentation.Norvy Villanueva
 
Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basicsJuraj Hantak
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking OverviewSreenivas Makam
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes securityThomas Fricke
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Docker Container Security - A Network View
Docker Container Security - A Network ViewDocker Container Security - A Network View
Docker Container Security - A Network ViewNeuVector
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in LinuxAnu Chaudhry
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondKubeAcademy
 
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œ
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œWindows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œ
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œCheolHee Han
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scriptingvceder
 
Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstackopenstackindia
 
Providing Local DNS with pfSense - pfSense Hangout August 2016
Providing Local DNS with pfSense - pfSense Hangout August 2016Providing Local DNS with pfSense - pfSense Hangout August 2016
Providing Local DNS with pfSense - pfSense Hangout August 2016Netgate
 

Was ist angesagt? (20)

Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introduction
 
Linux
LinuxLinux
Linux
 
NGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX: High Performance Load Balancing
NGINX: High Performance Load Balancing
 
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014
Squid, SquidGuard, and Lightsquid - pfSense Hangout March 2014
 
Server client-presentation.
Server client-presentation.Server client-presentation.
Server client-presentation.
 
Prometheus - basics
Prometheus - basicsPrometheus - basics
Prometheus - basics
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Kubernetes security
Kubernetes securityKubernetes security
Kubernetes security
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
WEB DESIGN
WEB DESIGNWEB DESIGN
WEB DESIGN
 
Docker Container Security - A Network View
Docker Container Security - A Network ViewDocker Container Security - A Network View
Docker Container Security - A Network View
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyond
 
File Sever
File SeverFile Sever
File Sever
 
Linux installation
Linux installationLinux installation
Linux installation
 
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œ
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œWindows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œ
Windows MSCS 욎영 및 Ʞ타 ì„€ìč˜ ê°€ìŽë“œ
 
Intro to Linux Shell Scripting
Intro to Linux Shell ScriptingIntro to Linux Shell Scripting
Intro to Linux Shell Scripting
 
Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstack
 
Providing Local DNS with pfSense - pfSense Hangout August 2016
Providing Local DNS with pfSense - pfSense Hangout August 2016Providing Local DNS with pfSense - pfSense Hangout August 2016
Providing Local DNS with pfSense - pfSense Hangout August 2016
 
Docker compose
Docker composeDocker compose
Docker compose
 

Andere mochten auch

EWD 3 Training Course Part 34: QEWD Resilient Mode
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
 
EWD 3 Training Course Part 29: Running QEWD as a Service
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
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsRob Tweed
 
EWD 3 Training Course Part 26: Event-driven Indexing
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
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
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
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDRob Tweed
 
EWD 3 Training Course Part 2: EWD 3 Overview
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 OverviewRob Tweed
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
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
 
EWD 3 Training Course Part 25: Document Database Capabilities
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
 
EWD 3 Training Course Part 21: Persistent JavaScript Objects
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
 
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
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
 
EWD 3 Training Course Part 20: The DocumentNode Object
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 ObjectRob Tweed
 
EWD 3 Training Course Part 19: The cache.node APIs
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
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
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
 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
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 ApplicationRob Tweed
 
EWD 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 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 3Rob Tweed
 
EWD 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 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 4Rob Tweed
 
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
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 ObjectsRob Tweed
 
EWD 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 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 2Rob Tweed
 
EWD 3 Training Course Part 35: QEWD Session Locking
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
 

Andere mochten auch (20)

EWD 3 Training Course Part 34: QEWD Resilient Mode
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
 
EWD 3 Training Course Part 29: Running QEWD as a Service
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
 
EWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD ApplicationsEWD 3 Training Course Part 30: Modularising QEWD Applications
EWD 3 Training Course Part 30: Modularising QEWD Applications
 
EWD 3 Training Course Part 26: Event-driven Indexing
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
 
EWD 3 Training Course Part 31: Using QEWD for Web and REST Services
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
 
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWDEWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
EWD 3 Training Course Part 28: Integrating Legacy Mumps Code with QEWD
 
EWD 3 Training Course Part 2: EWD 3 Overview
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
 
EWD 3 Training Course Part 24: Traversing a Document's Leaf Nodes
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
 
EWD 3 Training Course Part 25: Document Database Capabilities
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
 
EWD 3 Training Course Part 21: Persistent JavaScript Objects
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
 
EWD 3 Training Course Part 5a: First Steps in Building a QEWD Application
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
 
EWD 3 Training Course Part 20: The DocumentNode Object
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
 
EWD 3 Training Course Part 19: The cache.node APIs
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 APIs
 
EWD 3 Training Course Part 32: Configuring QEWD to use SSL/HTTPS
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/HTTPS
 
EWD 3 Training Course Part 5b: First Steps in Building a QEWD Application
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
 
EWD 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 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
 
EWD 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 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
 
EWD 3 Training Course Part 22: Traversing Documents using DocumentNode Objects
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
 
EWD 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 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
 
EWD 3 Training Course Part 35: QEWD Session Locking
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 Locking
 

Ähnlich wie EWD 3 Training Course Part 42: The QEWD Docker Appliance

Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
 
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
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Ben Hall
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016Chris Tankersley
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[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
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016Walid Shaari
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using DockerRuss Mckendrick
 
Docker workshop
Docker workshopDocker workshop
Docker workshopEvans Ye
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungDigicomp Academy AG
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and VirtualizationOpvizor, Inc.
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
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 PodmanMihai Criveti
 
[Codelab 2017] Docker Ʞ쎈 및 활용 방안
[Codelab 2017] Docker Ʞ쎈 및 활용 방안[Codelab 2017] Docker Ʞ쎈 및 활용 방안
[Codelab 2017] Docker Ʞ쎈 및 활용 ë°©ì•ˆì–‘ìžŹë™ 윔드랩
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Rally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVMRally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVMJ. Kristian Gonzalez
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using dockerThomas Kremmel
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris Tankersley
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Dockermsyukor
 

Ähnlich wie EWD 3 Training Course Part 42: The QEWD Docker Appliance (20)

Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 
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
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016Deploying Windows Containers on Windows Server 2016
Deploying Windows Containers on Windows Server 2016
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016
 
[Devconf.cz][2017] Understanding OpenShift Security Context Constraints
[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
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
How Reconnix Is Using Docker
How Reconnix Is Using DockerHow Reconnix Is Using Docker
How Reconnix Is Using Docker
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & Virtualisierung
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
 
Kubernetes Story - Day 1: Build and Manage Containers with Podman
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
 
[Codelab 2017] Docker Ʞ쎈 및 활용 방안
[Codelab 2017] Docker Ʞ쎈 및 활용 방안[Codelab 2017] Docker Ʞ쎈 및 활용 방안
[Codelab 2017] Docker Ʞ쎈 및 활용 방안
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Rally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVMRally_Docker_deployment_JumpVM
Rally_Docker_deployment_JumpVM
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Cicd.pdf
Cicd.pdfCicd.pdf
Cicd.pdf
 
Containerizing Web Application with Docker
Containerizing Web Application with DockerContainerizing Web Application with Docker
Containerizing Web Application with Docker
 

Mehr von Rob Tweed

QEWD Update
QEWD UpdateQEWD Update
QEWD UpdateRob Tweed
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language FeatureRob Tweed
 
LNUG: Having Your Node.js Cake and Eating It Too
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 TooRob Tweed
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
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 FunctionalityRob Tweed
 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
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.jsRob Tweed
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesRob Tweed
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesRob Tweed
 
QEWD.js: Have your Node.js Cake and Eat It Too
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 TooRob Tweed
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
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
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle TierRob Tweed
 
EWD 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 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 5Rob 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...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...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...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...Rob Tweed
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
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 CORSRob Tweed
 
EWD 3 Training Course Part 27: The QEWD Session
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 SessionRob Tweed
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsRob Tweed
 

Mehr von Rob Tweed (16)

QEWD Update
QEWD UpdateQEWD Update
QEWD Update
 
Data Persistence as a Language Feature
Data Persistence as a Language FeatureData Persistence as a Language Feature
Data Persistence as a Language Feature
 
LNUG: Having Your Node.js Cake and Eating It Too
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
 
EWD 3 Training Course Part 45: Using QEWD's Advanced MicroService Functionality
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
 
EWD 3 Training Course Part 44: Creating MicroServices with QEWD.js
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
 
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST ServicesEWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
EWD 3 Training Course Part 43: Using JSON Web Tokens with QEWD REST Services
 
QEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServicesQEWD.js, JSON Web Tokens & MicroServices
QEWD.js, JSON Web Tokens & MicroServices
 
QEWD.js: Have your Node.js Cake and Eat It Too
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
 
ewd-qoper8-vistarpc: Exposing VistA's RPCs as REST Services
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
 
qewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tierqewd-ripple: The Ripple OSI Middle Tier
qewd-ripple: The Ripple OSI Middle Tier
 
EWD 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 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
 
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...
EWD 3 Training Course Part 37: Building a React.js application with ewd-xpres...
 
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...
EWD 3 Training Course Part 36: Accessing REST and Web Services from a QEWD ap...
 
EWD 3 Training Course Part 33: Configuring QEWD to use CORS
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
 
EWD 3 Training Course Part 27: The QEWD Session
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
 
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode ObjectsEWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
EWD 3 Training Course Part 23: Traversing a Range using DocumentNode Objects
 

KĂŒrzlich hochgeladen

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœ
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœè‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœ
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœqr0udbr0
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessEnvertis Software Solutions
 

KĂŒrzlich hochgeladen (20)

Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœ
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœè‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœ
è‹±ć›œUNć­ŠäœèŻ,ćŒ—ćź‰æ™źéĄżć€§ć­ŠæŻ•äžšèŻäčŠ1:1ćˆ¶äœœ
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 

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