git.iko.soy/distributed-process
on master help sign in
Minor fixes
7044236Edsko de Vries
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+20−18
@@ -22,7 +22,8 @@
22-- machine using the standard Cloud Haskell primitives. In an ideal world, we
22-- machine using the standard Cloud Haskell primitives. In an ideal world, we
23-- could just start a Cloud Haskell node on the local machine, too.
23-- could just start a Cloud Haskell node on the local machine, too.
24-- Unfortunately, Cloud Haskell does not yet support using multiple network
24-- Unfortunately, Cloud Haskell does not yet support using multiple network
25+-- transports within the same system (i.e. both TCP/IP and SSH). This is a
25−-- transports (TCP/IP vs SSH). This is a temporary workaround.
26+-- temporary workaround.
26--
27--
27-- [Azure Setup]
28-- [Azure Setup]
28--
29--
@@ -45,11 +46,11 @@
45-- /as well as on your local machine/. We use Ubuntu Server 12.04 LTS for our
46-- /as well as on your local machine/. We use Ubuntu Server 12.04 LTS for our
46-- tests (running on VirtualBox on our local machine).
47-- tests (running on VirtualBox on our local machine).
47--
48--
48−-- When you set up your virtual machine, you can pick an arbitrary name; these
49+-- When you set up your virtual machine, you can pick an arbitrary virtual
49−-- names are for your own use only and do not need to be globally unique. Set a
50+-- machine name; these names are for your own use only and do not need to be
50−-- username and password; you should use the same username on all virtual
51+-- globally unique. Set a username and password; you should use the same
51−-- machines. You should also upload
52+-- username on all virtual machines. You should also upload an SSH key for
52−-- an SSH key for authentication (see
53+-- authentication (see
53-- /Converting OpenSSH keys for use on Windows Azure Linux VM's/,
54-- /Converting OpenSSH keys for use on Windows Azure Linux VM's/,
54-- <http://utlemming.azurewebsites.net/?p=91>, for
55-- <http://utlemming.azurewebsites.net/?p=91>, for
55-- information on how to convert a standard Linux @id_rsa.pub@ public key to
56-- information on how to convert a standard Linux @id_rsa.pub@ public key to
@@ -63,8 +64,8 @@
63-- Once your virtual machines have been set up, you have to make sure that the
64-- Once your virtual machines have been set up, you have to make sure that the
64-- user you created when you created the VM can ssh from any virtual machine to
65-- user you created when you created the VM can ssh from any virtual machine to
65-- any other using public key authentication. Moreover, you have to make sure
66-- any other using public key authentication. Moreover, you have to make sure
66−-- that @libssh2@ is installed; if you are using the Ubuntu image we recommend
67+-- that @libssh2@ is installed; if you are using the Ubuntu image you can
67−-- you can install @libssh2@ using
68+-- install @libssh2@ using
68--
69--
69-- > sudo apt-get install libssh2-1
70-- > sudo apt-get install libssh2-1
70--
71--
@@ -72,7 +73,7 @@
72-- message.)
73-- message.)
73--
74--
74-- In these notes, we assume three virtual machines called @CHDemo1@,
75-- In these notes, we assume three virtual machines called @CHDemo1@,
75−-- @CHDemo2@, and @CHDemo3@, all part of the @CloudHaskellDemo@ cloud service.
76+-- @CHDemo2@, and @CHDemo3@, all part of a @CloudHaskellDemo@ cloud service.
76--
77--
77-- [Obtaining a Management Certificate]
78-- [Obtaining a Management Certificate]
78--
79--
@@ -161,8 +162,9 @@
161-- > type RemoteProcess a = Closure (Backend -> Process a)
162-- > type RemoteProcess a = Closure (Backend -> Process a)
162--
163--
163-- (If you don't know what a 'Closure' is you should read
164-- (If you don't know what a 'Closure' is you should read
164−-- "Control.Distributed.Process.Closure".) 'spawnOnVM' terminates once the
165+-- "Control.Distributed.Process.Closure".); the remote process will be supplied
166+-- with an Azure backend initialized with the same parameters. 'spawnOnVM'
165−-- Cloud Haskell node has been set up.
167+-- returns once the Cloud Haskell node has been set up.
166--
168--
167-- 'callOnVM' is similar to 'spawnOnVM', but it takes a /pair/ of processes:
169-- 'callOnVM' is similar to 'spawnOnVM', but it takes a /pair/ of processes:
168-- one to run on the remote host (on a newly created Cloud Haskell node), and
170-- one to run on the remote host (on a newly created Cloud Haskell node), and
@@ -183,7 +185,7 @@
183-- Before you can try it you will first need to copy the executable to the remote server:
185-- Before you can try it you will first need to copy the executable to the remote server:
184--
186--
185-- > cloud-haskell-azure-echo install \
187-- > cloud-haskell-azure-echo install \
186−-- > --subscription-id <<your subscription ID> \
188+-- > --subscription-id <<your subscription ID>> \
187-- > --certificate /path/to/credentials.x509 \
189-- > --certificate /path/to/credentials.x509 \
188-- > --private /path/to/credentials.private \
190-- > --private /path/to/credentials.private \
189-- > --user <<remote username>> \
191-- > --user <<remote username>> \
@@ -195,7 +197,7 @@
195-- you can run it as follows:
197-- you can run it as follows:
196--
198--
197-- > cloud-haskell-azure-echo run \
199-- > cloud-haskell-azure-echo run \
198−-- > --subscription-id <<your subscription ID> \
200+-- > --subscription-id <<your subscription ID>> \
199-- > --certificate /path/to/credentials.x509 \
201-- > --certificate /path/to/credentials.x509 \
200-- > --private /path/to/credentials.private \
202-- > --private /path/to/credentials.private \
201-- > --user <<remote username>> \
203-- > --user <<remote username>> \
@@ -210,7 +212,7 @@
210-- > #
212-- > #
211--
213--
212-- "Control.Distributed.Process.Backend.Azure.GenericMain" provides a generic
214-- "Control.Distributed.Process.Backend.Azure.GenericMain" provides a generic
213−-- main function that you can to structure your code. It provides command line
215+-- main function that you can use to structure your code. It provides command line
214-- arguments such as the ones we saw in section /Testing the Setup/, it
216-- arguments such as the ones we saw in section /Testing the Setup/, it
215-- initializes the Azure backend, and it takes care of running your code on the
217-- initializes the Azure backend, and it takes care of running your code on the
216-- remote machines. You don't have to use 'genericMain' if you prefer not to,
218-- remote machines. You don't have to use 'genericMain' if you prefer not to,
@@ -286,7 +288,7 @@
286-- executable:
288-- executable:
287--
289--
288-- > cloud-haskell-azure-ping install \
290-- > cloud-haskell-azure-ping install \
289−-- > --subscription-id <<your subscription ID> \
291+-- > --subscription-id <<your subscription ID>> \
290-- > --certificate /path/to/credentials.x509 \
292-- > --certificate /path/to/credentials.x509 \
291-- > --private /path/to/credentials.private \
293-- > --private /path/to/credentials.private \
292-- > --user <<remote username>> \
294-- > --user <<remote username>> \
@@ -300,7 +302,7 @@
300-- @--virtual-machine@ argument):
302-- @--virtual-machine@ argument):
301--
303--
302-- > cloud-haskell-azure-ping run \
304-- > cloud-haskell-azure-ping run \
303−-- > --subscription-id <<your subscription ID> \
305+-- > --subscription-id <<your subscription ID>> \
304-- > --certificate /path/to/credentials.x509 \
306-- > --certificate /path/to/credentials.x509 \
305-- > --private /path/to/credentials.private \
307-- > --private /path/to/credentials.private \
306-- > --user <<remote username>> \
308-- > --user <<remote username>> \
@@ -315,7 +317,7 @@
315-- Finally, we can run the ping client:
317-- Finally, we can run the ping client:
316--
318--
317-- > cloud-haskell-azure-ping run
319-- > cloud-haskell-azure-ping run
318−-- > --subscription-id <<your subscription ID> \
320+-- > --subscription-id <<your subscription ID>> \
319-- > --certificate /path/to/credentials.x509 \
321-- > --certificate /path/to/credentials.x509 \
320-- > --private /path/to/credentials.private \
322-- > --private /path/to/credentials.private \
321-- > --user <<remote username>> \
323-- > --user <<remote username>> \
@@ -329,7 +331,7 @@
329-- Note that we must pass a different port number, because the client will run
331-- Note that we must pass a different port number, because the client will run
330-- within its own Cloud Haskell instance.
332-- within its own Cloud Haskell instance.
331--
333--
332−-- The code for the ping server is similar to the echo server, but demonstrates
334+-- The code for the ping demo is similar to the echo demo, but demonstrates
333-- both 'callable' and 'spawnable' and shows one way to discover nodes.
335-- both 'callable' and 'spawnable' and shows one way to discover nodes.
334--
336--
335-- > {-# LANGUAGE TemplateHaskell #-}
337-- > {-# LANGUAGE TemplateHaskell #-}