(mOSAIC) Platform guide
Contents
- (mOSAIC) Platform guide
- Automatic startup using Eucalyptus mOS instances
- Manual startup using Eucalyptus mOS instances
- Access web management console
- Access web log
- Controlling generic mOSAIC components
- Controlling example realtime-feeds components
- Creating generic Java components
- Debugging Java cloudlets (from Eclipse)
- Debugging generic Java components (from Eclipse)
- Debugging generic Java components (from commandline)
- Debugging generic components
- Batch-creating components
- Publishing Java artifacts on S3 (with Maven)
- Registering component types
- Access web user interface
Automatic startup using Eucalyptus mOS instances
install Eucalyptus tools; (for details see Eucalyptus;)
- prepare Eucalyptus parameters:
# only if you have the correct file # bash --noprofile --rcfile ~/.cloud/eucalyptus-bashrc
for the 0.2.x platform version or later (corresponding to the development or stable branches, b0.5 Java branch, and 0.5.x Maven artifact versions, or later):
{ _mos_token="$( od -A n -t x1 -N 4 /dev/urandom | tr -d ' ' )" _mos_application="mos-${_mos_token}" _mos_boot=mosaic-node-boot=0.6.0 _mos_data='#!'"app:${_mos_application}:${_mos_boot}" _mos_eki=eki-86820EC9 _mos_eri=eri-7C250EA5 _mos_emi=emi-8B900EB3 _mos_type=m1.xlarge _mos_count=1 _mos_user=ccraciun _mos_group="mos-${_mos_token}" _mos_zone=default _mos_key=default _mos_myip="$( curl -s http://cloud.info.uvt.ro/_mosaic/detect-client-ip | sed -r -e 's#^([0-9.]+)$#\1#' -e 't' -e 'Q1' | head -n 1 )" }
for the 0.1 platform version (corresponding to the legacy branches, b0.4 Java branch, and 0.4.0 Maven artifact versions):
{ _mos_token="$( od -A n -t x1 -N 4 /dev/urandom | tr -d ' ' )" _mos_application="mos-${_mos_token}" _mos_boot=mosaic-node-boot=0.1.alpha _mos_data='#!'"app:${_mos_application}:${_mos_boot}" _mos_eki=eki-862F0EC0 _mos_eri=eri-71010E60 _mos_emi=emi-72A40E44 _mos_type=m1.xlarge _mos_count=1 _mos_user=ccraciun _mos_group="mos-${_mos_token}" _mos_zone=default _mos_key=default _mos_myip="$( curl -s http://cloud.info.uvt.ro/_mosaic/detect-client-ip | sed -r -e 's#^([0-9.]+)$#\1#' -e 't' -e 'Q1' | head -n 1 )" }
- create Eucalyptus security group:
( set -x -e -E -u -o pipefail || exit 1 euca-add-group -d "mOSAIC Cluster" "${_mos_group}" euca-authorize -P icmp -s 0.0.0.0/0 "${_mos_group}" euca-authorize -P tcp -p 22 -s 0.0.0.0/0 "${_mos_group}" euca-authorize -P tcp -p 80 -s 0.0.0.0/0 "${_mos_group}" euca-authorize -P tcp -p 81 -s 0.0.0.0/0 "${_mos_group}" euca-authorize -P tcp -p 1-65535 -s 172.16.0.0/24 "${_mos_group}" euca-authorize -P udp -p 1-65535 -s 172.16.0.0/24 "${_mos_group}" euca-authorize -P tcp -p 1-65535 -s "${_mos_myip}/32" "${_mos_group}" euca-authorize -P udp -p 1-65535 -s "${_mos_myip}/32" "${_mos_group}" sleep 2s )
- create Eucalyptus mOS instances:
( set -x -e -E -u -o pipefail || exit 1 euca-run-instances \ -n "${_mos_count}" -d "${_mos_data}" \ "${_mos_emi}" --kernel "${_mos_eki}" --ramdisk "${_mos_eri}" -t "${_mos_type}" \ -g "${_mos_group}" -z "${_mos_zone}" -k "${_mos_key}" --addressing public sleep 2s )
- (optional) monitor Eucalyptus instances (through controller service):
( set -e -E -u -o pipefail || exit 1 while true ; do echo curl -v -s "http://${_mos_application}.apps.mosaic.ieat.ro:31808/v1/log/content" && break || true sleep 2s continue done )
- (optional) monitor Eucalyptus instances:
( set -e -E -u -o pipefail || exit 1 while true ; do echo euca-describe-instances | tr '\t' ' ' | \ ( while read _type _identifier _column_3 _column_4 _rest ; do test "${_type}" != RESERVATION -o "${_column_4}" != "${_mos_group}" || break done while read _type _identifier _emi _public_ip _private_ip _status _rest ; do test "${_type}" == INSTANCE || break echo "${_type} ${_identifier} ${_emi} ${_public_ip} ${_private_ip} ${_status}" done while read _rest ; do true ; done ) | sort sleep 2s done )
- (optional) terminate Eucalyptus instances:
( set -x -e -E -u -o pipefail || exit 1 euca-describe-instances | tr '\t' ' ' | \ ( while read _type _identifier _column_3 _column_4 _rest ; do test "${_type}" != RESERVATION -o "${_column_4}" != "${_mos_group}" || break done while read _type _identifier _emi _public_ip _private_ip _rest ; do test "${_type}" == INSTANCE || break euca-terminate-instances "${_identifier}" sleep 2s done while read _rest ; do true ; done ) sleep 2s euca-delete-group "${_mos_group}" sleep 2s )
Manual startup using Eucalyptus mOS instances
- access Eucalyptus instance console;
- install the needed packages:
for the 0.2.x platform version or later (corresponding to the development or stable branches, b0.5 Java branch, and 0.5.x Maven artifact versions, or later):
tazpkg get-install mosaic-node-boot-0.6.0
for the 0.1 platform version (corresponding to the legacy branches, b0.4 Java branch, and 0.4.0 Maven artifact versions):
tazpkg get-install mosaic-node-boot-0.1.alpha
- (optional) upgrade the needed packages:
/opt/mosaic-node-boot/bin/upgrade
- run the needed services:
/opt/mosaic-node-boot/bin/run
Access web management console
- open in a browser the following URL:
either by using the public DNS name http://${instance-identifier}-pub.vms.mosaic.ieat.ro:31808/
example: http://i-48C406E5-pub.vms.mosaic.ieat.ro:31808/
either by using the public IP address http://${instance-public-ip}:31808/
example: http://194.102.62.142:31808/
Access web log
for the 0.2.x platform version or later (where x >= 1) (corresponding to the development branches):
remove the /v1 token and leave the URL just like ...:31808/log/...;
if using the automatic startup procedure:
- open in a web browser the following URL:
either by using the public DNS name http://${instance-identifier}-pub.vms.mosaic.ieat.ro:31808/v1/log/stream
example: http://i-48C406E5-pub.vms.mosaic.ieat.ro:31808/v1/log/stream
either by using the public IP address http://${instance-public-ip}:31808/v1/log/stream
example: http://194.102.62.142:31808/v1/log/stream
or open with curl from the console the URL as above:
example:
curl -s http://194.102.62.142:31808/v1/log/stream
- or by listing the log file through SSH:
- either by using the public DNS name:
ssh -T -l root i-48C406E5-pub.vms.mosaic.ieat.ro -i "${EC2_PRIVATE_KEY}" -o StrictHostKeyChecking=no -- tail -f /tmp/mosaic-exe.log
- either by using the public IP address:
ssh -T -l root 194.102.62.142 -i "${EC2_PRIVATE_KEY}" -o StrictHostKeyChecking=no -- tail -f /tmp/mosaic-exe.log
- either by using the public DNS name:
- open in a web browser the following URL:
Controlling generic mOSAIC components
- (everything goes inside the web management console;)
- customized mOSAIC RabbitMQ instance:
- create:
rabbit = mosaic.processes.create ("#mosaic-components:rabbitmq")
- get management endpoint:
mosaic.processes.call (rabbit, "mosaic-rabbitmq:get-management-endpoint") .url
- stop:
mosaic.processes.stop (rabbit)
- create:
- customized mOSAIC Riak-KV instance (or cluster):
- create:
riak = mosaic.processes.create ("#mosaic-components:riak-kv")
- get management endpoint:
mosaic.processes.call (riak, "mosaic-riak-kv:get-store-http-endpoint") .url
- stop:
mosaic.processes.stop (riak)
- create:
- mOSAIC HTTP Gateway (requires a RabbitMQ instance):
- create:
httpg = mosaic.processes.create ("#mosaic-components:httpg")
- get gateway endpoint:
mosaic.processes.call (httpg, "mosaic-httpg:get-gateway-endpoint") .url
try it in a browser and you should see an unhandled request message;
- stop:
mosaic.processes.stop (httpg)
- create:
Controlling example realtime-feeds components
- create the RabbitMQ, Riak-KV and HTTP Gateway components as above;
- create components:
for the 0.2.x platform version or later (corresponding to the development or stable branches, b0.5 Java branch, and 0.5.x Maven artifact versions, or later):
rtf_scale = 1 rtf_frontends = mosaic.processes.create ("#mosaic-applications-realtime-feeds:frontend-java", [null], rtf_scale) rtf_fetchers = mosaic.processes.create ("#mosaic-applications-realtime-feeds:fetcher", null, rtf_scale) rtf_indexers = mosaic.processes.create ("#mosaic-applications-realtime-feeds:indexer", null, rtf_scale)
for the 0.1 platform version (corresponding to the legacy branches, b0.4 Java branch, and 0.4.0 Maven artifact versions):
rtf_scale = 1 rtf_frontends = mosaic.processes.create ("#mosaic-examples-realtime-feeds:frontend", null, rtf_scale) rtf_fetchers = mosaic.processes.create ("#mosaic-examples-realtime-feeds:fetcher", null, rtf_scale) rtf_indexers = mosaic.processes.create ("#mosaic-examples-realtime-feeds:indexer", null, rtf_scale)
- stop components:
for (i in rtf_frontends) mosaic.processes.stop (rtf_frontends[i]) for (i in rtf_fetchers) mosaic.processes.stop (rtf_fetchers[i]) for (i in rtf_indexers) mosaic.processes.stop (rtf_indexers[i])
- stop the RabbitMQ, Riak-KV and HTTP Gateway components as above;
Creating generic Java components
- create a single Java jar that contains all the needed classes and resources; (hint: use Maven assembly plugin;)
- upload the single Java jar accessible over HTTP somewhere;
- create:
for the 0.2.x platform version or later (corresponding to the development or stable branches, b0.5 Java branch, and 0.5.x Maven artifact versions, or later):
- from exported Java jar:
component = mosaic.processes.create ("#mosaic-components:java-component-container", [ "eu.mosaic_cloud.examples.components.simple.AbacusComponentCallbacks", null, ["http://data.volution.ro/ciprian/4b5b2d5f27a74064a4598d81d66cd776/mosaic-examples-abacus-0.5.0_mosaic_dev-SNAPSHOT-jar-with-dependencies.jar"]])
- from exported Java jar:
for the 0.1 platform version (corresponding to the legacy branches, b0.4 Java branch, and 0.4.0 Maven artifact versions):
- from exported Java jar:
component = mosaic.processes.create ("#mosaic-components:java-container", [ "eu.mosaic_cloud.components.examples.abacus.AbacusComponentCallbacks", "http://data.volution.ro/ciprian/5e069b1ba84ae3ab9c0eb0d8cbcb0a57/mosaic-examples-abacus-0.4-SNAPSHOT-jar-with-dependencies.jar"])
from exported Java classes with eu.mosaic_cloud.tools.ClasspathExporter:
component = mosaic.processes.create ("#mosaic-components:java-container", ["eu.mosaic_cloud.components.examples.abacus.AbacusComponentCallbacks", "http://127.0.0.1:27665/"])
to forward your local ClasspathExporter server to the mOS instance:
ssh -v -T -N -l root i-48C406E5-pub.vms.mosaic.ieat.ro -R 127.0.0.1:27665:127.0.0.1:27665 -i "${EC2_PRIVATE_KEY}" -o StrictHostKeyChecking=no
- from exported Java jar:
- call:
mosaic.processes.call (component, "+", [1, 2])
- stop:
mosaic.processes.stop (component)
Debugging Java cloudlets (from Eclipse)
only for the 0.2.x platform version or later (corresponding to the development and stable branches, b0.5 Java branch, and 0.5.0 Maven artifact versions, or later);
follow the exact steps as in #Debugging generic Java components (from Eclipse), except:
use as the project either mosaic-cloudlets;
include in the classpath the project you are working in; (see the Classpath tab, User Entries item;)
as the *PreMain class use eu.mosaic_cloud.cloudlets.implementation.container.CloudletComponentPreMain;
as the --component-callbacks-configuration use {\"descriptor\":\"some-cloudlet.properties\"};
--launch --component-callbacks-configuration {\"descriptor\":\"some-cloudlet.properties\"} --controller-url http://127.0.155.0:31808/ --local-address 127.0.0.1 --local-port 27403
Debugging generic Java components (from Eclipse)
For `0.2.x` platform version (or later)
only for the 0.2.x platform version or later (corresponding to the development and stable branches, b0.5 Java branch, and 0.5.0 Maven artifact versions, or later);
- create the Eclipse run configuration:
from the Run menu select Run Configurations...;
select Java Application, right click, and select New;
set a meaningful name in the Name textbox (e.g. Abacus);
in the Main tab:
select right project in the Project textbox (e.g. mosaic-examples-simple-components);
find the *PreMain class suitable for your component (e.g. eu.mosaic_cloud.examples.components.simple.AbacusComponentPreMain;
set the *PreMain class in the Main class text-box; (be aware that some times you can't find it with the Search... option, just paste it there;)
in the Arguments tab:
set the main arguments in the Program arguments textbox:
the second argument value is a JSON configuration sent to the component; (usually kept on null;)
the third argument value (e.g. http://127.0.155.0:31808/) is the controller URL (as identified in the previous sections); ( it is not the WUI URL, but the console URL;)
the forth argument (e.g. 127.0.0.1) is the IP address of the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
the fifth argument (e.g. 27403) is an unused port on the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
don't use 127.0.0.1, substitute it with the proper value;
if you encounter class-loader exceptions, then use as the project either mosaic-components-container or mosaic-cloudlets, and include in the classpath the project you are interested in;
--launch --component-callbacks-configuration null --controller-url http://127.0.155.0:31808/ --local-address 127.0.0.1 --local-port 27403
set the VM arguments in the VM arguments textbox (please set the correct value for java.library.path):
-Djava.library.path=... -Dlogback.levels.root=info
finalize with Apply and Close;
start the Eclipse run configuration: from the Run menu select the previously created configuration; (this starts the component locally, and registers it to the cluster;)
- interact with the component normally through the console or the WUI;
stop the Eclipse run configuration: from the Console view, press the Stop button; (this stops the component locally, and removes it from the cluster;)
For `0.2.0` platform version (or later)
only for the 0.2.0 platform version or later (corresponding to the stable branches, b0.5 Java branch, and 0.5.0 Maven artifact versions, or later);
inside your component Maven artifact POM, declare a dependency on the component-launcher artifact (beside the other needed component-* artifacts):
... <dependency> <groupId>eu.mosaic_cloud.components</groupId> <artifactId>components-launcher</artifactId> <version>${project.version}</version> </dependency> ...
- create the Eclipse run configuration:
from the Run menu select Run Configurations...;
select Java Application, right click, and select New;
set a meaningful name in the Name textbox (e.g. Abacus);
in the Main tab:
select right project in the Project textbox (e.g. mosaic-examples-simple-components);
set the main class eu.mosaic_cloud.components.implementations.basic.BasicComponentLauncher in the Main class text-box; (be aware that you can't find it with the Search... option, just paste it there;)
in the Arguments tab:
set the main arguments in the Program arguments textbox:
- first argument is the callbacks class;
the second argument is a JSON configuration sent to the component; (usually kept on null;)
the third argument (e.g. 127.0.0.1) is the IP address of the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
the forth argument (e.g. 27403) is an unused port on the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
the fifth argument (e.g. http://127.0.155.0:31808/) is the controller URL (as identified in the previous sections); ( it is not the WUI URL, but the console URL;)
don't use 127.0.0.1, substitute it with the proper value;
if you encounter class-loader exceptions, then use as the project either mosaic-components-container or mosaic-cloudlets, and include in the classpath the project you are interested in;
eu.mosaic_cloud.examples.components.simple.AbacusComponentCallbacks null local 127.0.0.1 27403 http://127.0.155.0:31808/
set the VM arguments in the VM arguments textbox (please set the correct value for java.library.path):
-Djava.library.path=... -Dlogback.levels.root=info
finalize with Apply and Close;
start the Eclipse run configuration: from the Run menu select the previously created configuration; (this starts the component locally, and registers it to the cluster;)
- interact with the component normally through the console or the WUI;
stop the Eclipse run configuration: from the Console view, press the Stop button; (this stops the component locally, and removes it from the cluster;)
Debugging generic Java components (from commandline)
only for the 0.2.x platform version or later (corresponding to the development or stable branches, b0.5 Java branch, and 0.5.x Maven artifact versions, or later);
- you could try to replicate what has been presented above, but from the command line;
- but, most components (like cloudlets, Jetty, etc), are customized with specific arguments to run "detached" from the component controller;
- for example the Riak driver:
java \ -Djava.library.path=./lib \ -jar ./target/drivers-stubs-riak-0.5.0_mosaic_dev-SNAPSHOT-component.jar \ --launch \ --controller-url http://127.0.155.0:31808/ \ --local-address 127.0.0.1 \ --local-port 27403
- for example the template cloudlet component:
java \ -Djava.library.path=../../.lib \ -jar ./target/examples-template-cloudlets-0.5.0_mosaic_dev-SNAPSHOT-cloudlet-component.jar \ --launch \ --controller-url http://127.0.155.0:31808/ \ --local-address 127.0.0.1 \ --local-port 27403
- or if you are on mOS you could directly call:
./bin/mosaic-components-java-driver-riak--run-component \ --launch \ --controller-url http://127.0.155.0:31808/ \ --local-address 127.0.0.1 \ --local-port 27403
Debugging generic components
only for the 0.2.x platform version or later (corresponding to the development or stable branches);
- (everything goes inside the web management console;)
- component proxy instance:
the ip address (e.g. 127.0.0.1) is the IP address of the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
the port argument (e.g. 27404) is an unused port on the local computer ( which must be accessible from the PTC or the Eucalyptus cluster;)
don't use 127.0.0.1, substitute it with the proper value;
- create:
component_stub_1 = mosaic.processes.create ("#mosaic-tests:socat", ["component-stub-1", "tcp:127.0.0.1:24704,forever,fork"])
- stop:
mosaic.processes.stop (component_stub_1)
- (everything goes inside the local terminal;)
- component instance:
socat tcp-listen:24704,reuseaddr exec:'./scripts/run-component'
Batch-creating components
For `0.2.x` (where x >= 1) platform version (or later)
for the 0.2.x (where x >= 1) platform version or later (corresponding to the development branches);
you need follow the same steps as for 0.2.0 (described below), but
add a new annotation property for each component, which can have as value any arbitrary JSON:
"<<component-x>>" : { ..., "annotation" : null },
For `0.2.0` platform version
only for the 0.2.0 platform version (corresponding to the stable branches);
- prepare a "batch" (JSON) with the following structure (everything in angle brackets is replaceable):
{ "<<component-1>>" : { "type" : "#<<type-1>>", "configuration" : <<json-term>>, "count" : <<positive-integer>>, "order" : <<positive-integer>>, "delay" : <<positive-integer-measuring-milliseconds>> }, "<<component-2>>" : { "type" : "#<<type-1>>", "configuration" : <<json-term>>, "count" : <<positive-integer>>, "order" : <<positive-integer>>, "delay" : <<positive-integer-measuring-milliseconds>> } }
- submit the previous created JSON to the controller:
if you have saved it in a file (in the following example we assume it's named batch.json):
curl -X POST -H 'Content-Type: application/json' --data-binary @./batch.json http://i-48C406E5-pub.vms.mosaic.ieat.ro:31808/v1/processes/create
if you want to paste it directly in the console (replace ... with the batch file; don't remove the line EOS):
curl -X POST -H 'Content-Type: application/json' --data-binary @- http://i-48C406E5-pub.vms.mosaic.ieat.ro:31808/v1/processes/create <<'EOS' ... EOS
for example to start all the needed components for the real-time feeds (for the 0.2.x platform version or later):
curl -X POST -H 'Content-Type: application/json' --data-binary @- http://i-48C406E5-pub.vms.mosaic.ieat.ro:31808/v1/processes/create <<'EOS' { "rabbitmq" : { "type" : "#mosaic-components:rabbitmq", "configuration" : null, "count" : 1, "order" : 1, "delay" : 2000 }, "riak-kv" : { "type" : "#mosaic-components:riak-kv", "configuration" : null, "count" : 3, "order" : 2, "delay" : 2000 }, "httpg" : { "type" : "#mosaic-components:httpg", "configuration" : null, "count" : 1, "order" : 2, "delay" : 2000 }, "fetcher" : { "type" : "#mosaic-applications-realtime-feeds:fetcher", "configuration" : null, "count" : 3, "order" : 3, "delay" : 0 }, "indexer" : { "type" : "#mosaic-applications-realtime-feeds:indexer", "configuration" : null, "count" : 3, "order" : 3, "delay" : 0 }, "frontend" : { "type" : "#mosaic-applications-realtime-feeds:frontend-java", "configuration" : [null], "count" : 3, "order" : 3, "delay" : 0 } } EOS
Publishing Java artifacts on S3 (with Maven)
you must already have a bucket which:
- it must be writable by the user to which the access and secret key pair belongs to;
- it must be readable by anyone (which is required by the platform); (however you could configure a bucket policy to impose various restrictions;)
- (alternatively look at the end of this section on how to configure a minimal, thus more strict, bucket policy;)
add the following snippets to the pom.xml file:
replace the token {{bucket}} with the proper name of your bucket;
<build> <extensions> <extension> <groupId>org.springframework.build</groupId> <artifactId>aws-maven</artifactId> <version>4.4.0.RELEASE</version> </extension> </extensions> </build>
<repositories> <repository> <id>mosaic-aws</id> <name>mOSAIC Repository (AWS)</name> <url>s3://{{bucket}}/</url> <layout>default</layout> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <distributionManagement> <repository> <id>mosaic-releases-aws</id> <name>mOSAIC Releases Repository (AWS)</name> <url>s3://{{bucket}}/</url> </repository> <snapshotRepository> <id>mosaic-snapshots-aws</id> <name>mOSAIC Snapshots Repository (AWS)</name> <url>s3://{{bucket}}/</url> <uniqueVersion>false</uniqueVersion> </snapshotRepository> </distributionManagement>
add the following snippet to the ~/.m2/settings.xml file:
replace the tokens {{access-key}} and {{secret-key}} with the proper credentials of your account (or IAM user);
<servers> <server> <id>mosaic-releases-aws</id> <username>{{access-key}}</username> <passphrase>{{secret-key}}</passphrase> </server> <server> <id>mosaic-snapshots-aws</id> <username>{{access-key}}</username> <passphrase>{{secret-key}}</passphrase> </server> </servers>
- deploy:
mvn deploy -DskipTests
- the URL's of the artifacts are:
http://{{bucket}}.s3.amazonaws.com/{{group-id-and-artifact-id}}/{{version}}/{{artifact-id}}-{{version}}-{{classifier}}.jar;
(just see the mvn logs, and replace the prefix s3://{{bucket}}/... with http://{{bucket}}.s3.amazonaws.com/...;)
- to configure the bucket policy you must:
- create the bucket;
create the IAM user, then create a pair of access and secret keys; (which must also be used in the ~/.m2/setings.xml file;)
- to allow only that particular user to upload files, but anyone else (even unauthenticated) to download files, set the following as the bucket policy:
replace the token {{random-value}} with something completely random and unique; (for example you could use an UUID;)
replace the token {{user-arn}} with the proper value obtained by looking at the "Summary" tab in the IAM console; (for example the value looks like arn:aws:iam::738766339001:user/mosaic-artifacts;)
replace the token {{bucket}} with the proper bucket name;
{ "Version": "2008-10-17", "Id": "{{random-value}}", "Statement": [ { "Sid": "{{random-value}}", "Effect": "Allow", "Principal": { "AWS": "{{user-arn}}" }, "Action": [ "s3:GetObject*", "s3:PutObject*", "s3:DeleteObject*" ], "Resource": "arn:aws:s3:::{{bucket}}/*" }, { "Sid": "{{random-value}}", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::{{bucket}}/*" } ] }
Registering component types
only for the 0.2.x (where x >= 1) platform version or later (corresponding to the development branches);
- (everything goes inside the web management console;)
- choose an unused, unique name for the new component type;
- obtain from the documentation or by asking the developers the following pieces of information:
backend_module (a string), backend_function (a string);
context (a JSON object), conforming to the requirements of the above two;
- register the new component configurator:
in this example we create an alias for an existing component type, but with a constant configuration (specified when registering in the forth argument as part of the configuration field);
but when creating the component the configuration must always be null (as it is going to be replaced by the configuration field inside the context of the configurator);
(you could use this to register a cloudlet component as a custom component type; all you need to do is put inside the context
mosaic.processes.configurators.register ( "#custom:rabbitmq", "mosaic_component_process_configurators", "configure_static", {"type" : "#mosaic-components:rabbitmq", "configuration" : null})
- test the new component configurator:
mosaic.processes.create ("#custom:rabbitmq")
Access web user interface
- open in a browser the following URL:
either by using the public DNS name http://${instance-identifier}-pub.vms.mosaic.ieat.ro:31810/
example: http://i-48C406E5-pub.vms.mosaic.ieat.ro:31810/
either by using the public IP address http://${instance-public-ip}:31810/
example: http://194.102.62.142:31810/