This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add strategy for distributed deployment
- Loading branch information
Showing
5 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,9 @@ includes org.amelia.dsl.examples.ubuntu.frascati.demo.Client | |
* <p> | ||
* This deployment expects the following parameters: | ||
* <ul> | ||
* <li> host: the host name to install docker and run the container | ||
* <li> privileged-user: a privileged user to install Docker | ||
* <li> unprivileged-user: an unprivileged user to run the container | ||
* <li> host: the host name to install Java & FraSCAti, and execute the components | ||
* <li> privileged-user: a privileged user to install the required software | ||
* <li> unprivileged-user: an unprivileged user to run the components | ||
* </ul> | ||
* | ||
* @author Miguel Jimenez ([email protected]) | ||
|
36 changes: 36 additions & 0 deletions
36
...src/main/amelia/org/amelia/dsl/examples/ubuntu/frascati/demo/DistributedDeployment.amelia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package org.amelia.dsl.examples.ubuntu.frascati.demo | ||
|
||
includes org.amelia.dsl.examples.ubuntu.frascati.FraSCAti | ||
includes org.amelia.dsl.examples.ubuntu.frascati.demo.Server | ||
includes org.amelia.dsl.examples.ubuntu.frascati.demo.Client | ||
|
||
/* | ||
* Distributed deployment to run the FraSCAti helloworld-rmi project | ||
* in two hosts. | ||
* <p> | ||
* This deployment expects the following parameters: | ||
* <ul> | ||
* <li> host-server: the host name to install Java & FraSCAti, and execute the server component | ||
* <li> host-client: the host name to install Java & FraSCAti, and execute the client component | ||
* <li> privileged-user: a privileged user to install the required software in both hosts | ||
* <li> unprivileged-user: an unprivileged user to run the components in both hosts | ||
* </ul> | ||
* | ||
* @author Miguel Jimenez ([email protected]) | ||
* @date 2017-09-22 | ||
*/ | ||
deployment DistributedDeployment { | ||
// Input data | ||
val privileged = System.getProperty('privileged-user') | ||
val unprivileged = System.getProperty('unprivileged-user') | ||
val server = System.getProperty('host-server') | ||
val client = System.getProperty('host-client') | ||
|
||
// configure subsystems | ||
add(new FraSCAti(unprivileged, #[ host(server, privileged), host(client, privileged) ])) | ||
add(new Server(host(server, unprivileged))) | ||
add(new Client(host(client, unprivileged))) | ||
|
||
// Deploy the subsystems & stop the executed components | ||
start(true) | ||
} |