You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>ALIEN provides an easy way to configure a plugin by generating the UI based on a configuration object using introspection. It also manages persistency of the configuration.</p>
140
140
141
-
<p>In order to enable plugin configuration, one of the bean in your spring context must implements the _IPluginConfigurator<t>_ interface. This interface (see signature below) allow to provide a POJO that will act as the configuration object for the whole plugin.</t></p>
141
+
<p>In order to enable plugin configuration, one of the bean in your spring context must implements the _IPluginConfigurator<T>_ interface. This interface (see signature below) allow to provide a POJO that will act as the configuration object for the whole plugin.</T></p>
Copy file name to clipboardExpand all lines: developer_guide/ui_plugins.html
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ <h5>UI plugins isolation</h5>
39
39
<p>We have found some issues in 1.1.0 version in isolation of ui plugins that we resolved in 1.2.0 version. This however requires that your plugin defines a namespace in the require configuration. We have updated our plugin sample in order to take that update into account.</p>
<p>Our sample ui plugin ships with a packaging process that is similar to alien4cloud and that we recommend you to follow. On top of the packaging process we leverage <strong>maven</strong> as every plugin requires a minimal java configuration spring bean (see the <ahref="#/developer_guide/plugin.html">main plugin documentation</a>).</p>
45
45
46
-
<p><strong>Maven</strong> delegates to <strong>Grunt</strong> the packaging of the ui part of the plugin. Grunt basically does a few things but the most important from a packaging perspective is the usage of <strong>requirejs</strong> to create a single script that contains the plugin and it’s dependencies.</p>
46
+
<p><strong>Maven</strong> delegates to <strong>Grunt</strong> the packaging of the ui part of the plugin. Grunt basically does a few things but the most important from a packaging perspective is the usage of <strong>requirejs</strong> to create a single script that contains the plugin and it’s dependencies.</p>
47
47
48
48
<p><strong>Requirejs</strong> grunt plugin configuration files lies in <em>src/main/build/config/requirejs.js</em>.</p>
49
49
@@ -53,16 +53,16 @@ <h2 id="configuring-your-module-entry-point">Configuring your module entry point
53
53
54
54
<ul>
55
55
<li>The <strong>mainConfigFile</strong> (<em>./src/main/webapp/scripts/plugin-require.config.js</em>) in our sample plugin.</li>
56
-
<li>The module(s) to package, in our case it is called <em>‘a4c-plugin-sample’</em>:</li>
56
+
<li>The module(s) to package, in our case it is called <em>‘a4c-plugin-sample’</em>:</li>
<p>Our Require JS configuration specifies the application root directory to be <em>appDir: ‘<%= yeoman.app %>’,</em> which is defined in our main gruntfile <em>Gruntfile.js</em> to <em>src/main/webapp</em>. Hence require js will look for the <strong>src/main/webappscripts/plugin.js</strong> file as your module entry point. Note that the <em>.js</em> extension is added automatically by requirejs.</p>
65
+
<p>Our Require JS configuration specifies the application root directory to be <em>appDir: ‘<%= yeoman.app %>’,</em> which is defined in our main gruntfile <em>Gruntfile.js</em> to <em>src/main/webapp</em>. Hence require js will look for the <strong>src/main/webappscripts/plugin.js</strong> file as your module entry point. Note that the <em>.js</em> extension is added automatically by requirejs.</p>
66
66
67
67
<divclass="note">
68
68
<p>It is a best practice to use a module name that will be the same as the plugin id (as defined in your plugin descriptor) even if that is not required.</p>
@@ -76,17 +76,17 @@ <h2 id="referencing-alien4cloud-existing-modules-and-dependencies">Referencing a
<p>When requirejs will build the project and package all script within a single file it will try to find some modules called <em>lodash</em><em>jquery</em> and <em>d3</em>. Such have not been defined yet and the build will fail with the following error: <em>Error: ENOENT: no such file or directory, open ‘/path_to_your_project_directory/alien4cloud-plugin-sample/target/webapp/lodash.js’</em>. In order to avoid that we must instruct requirejs that there is no need to look for this file in package phase (requirejs will try to get it only at runtime - so it has to exists within alien4cloud core ;)). In the requirejs grunt task config file (<em>src/main/build/config/requirejs.js</em>) we will add the following information:</p>
79
+
<p>When requirejs will build the project and package all script within a single file it will try to find some modules called <em>lodash</em><em>jquery</em> and <em>d3</em>. Such have not been defined yet and the build will fail with the following error: <em>Error: ENOENT: no such file or directory, open ‘/path_to_your_project_directory/alien4cloud-plugin-sample/target/webapp/lodash.js’</em>. In order to avoid that we must instruct requirejs that there is no need to look for this file in package phase (requirejs will try to get it only at runtime - so it has to exists within alien4cloud core ;)). In the requirejs grunt task config file (<em>src/main/build/config/requirejs.js</em>) we will add the following information:</p>
<p>Now requirejs know that these files are provided and should not be packaged within the plugin!</p>
84
84
85
85
<h2id="referencing-new-dependencies">Referencing new dependencies</h2>
86
86
87
-
<p>Well now we know how to reference alien4cloud scripts in our plugin but your plugin may also require some dependencies that are not already packaged within alien4cloud core. So first of all let’s get the dependency in our project!</p>
87
+
<p>Well now we know how to reference alien4cloud scripts in our plugin but your plugin may also require some dependencies that are not already packaged within alien4cloud core. So first of all let’s get the dependency in our project!</p>
88
88
89
-
<p>Let’s suppose that we want to use the <em>angular-ui-sortable</em> library that is not included in alien4cloud core.</p>
89
+
<p>Let’s suppose that we want to use the <em>angular-ui-sortable</em> library that is not included in alien4cloud core.</p>
90
90
91
91
<p>We use bower to manage javascript dependencies so the first thing will be to edit the <em>bower.json</em> configuration file to add our dependency.</p>
92
92
@@ -102,7 +102,7 @@ <h2 id="referencing-new-dependencies">Referencing new dependencies</h2>
102
102
103
103
<h2id="referencing-your-own-scripts">Referencing your own scripts</h2>
104
104
105
-
<p>Well this is quite obvious but you will probably have more than one script, controller, service, directive within your plugin. As we have defined already our entry point we can reference another script from it (the other script will be able to also reference it’s dependencies etc.).</p>
105
+
<p>Well this is quite obvious but you will probably have more than one script, controller, service, directive within your plugin. As we have defined already our entry point we can reference another script from it (the other script will be able to also reference it’s dependencies etc.).</p>
106
106
107
107
<p>As you remember the base directory of the plugin application, as defined in requirejs, is the <em>src/main/webapp</em> folder. So loading a <em>hello-service.js</em> script, from the <em>src/main/webapp/scripts</em> directory, is just as easy as the following:</p>
<p>Now that you know how to manage your scripts and package them as a single file with requirejs, you may want to access the static resources of your plugin (images, html view, css, etc.).</p>
114
114
115
-
<p>Our backend packaging system is a bit tricky and all plugin’s static files (basically all files within the <em>ui</em> folder of your plugin actually) can be accessed from a url that contains your plugin unique id as generated by alien4cloud. Long make short, you actually don’t know when writing the plugin how to access them.</p>
115
+
<p>Our backend packaging system is a bit tricky and all plugin’s static files (basically all files within the <em>ui</em> folder of your plugin actually) can be accessed from a url that contains your plugin unique id as generated by alien4cloud. Long make short, you actually don’t know when writing the plugin how to access them.</p>
116
116
117
117
<p>Hopefully we provides you with a way to easily retrieve them! The <strong>plugins</strong> module of alien4cloud allows you to get the base url of your plugin ui directory. For example, to get the <em>views/hello.html</em> resource you can just do the following:</p>
<p>Find here informations about how to perform backup / restore your alien4cloud, and also, migrate from <code>alien4cloud 1.2.1</code> to <code>alien4cloud 1.3.x</code>.</p>
34
+
<p>Find here informations about how to perform backup / restore your alien4cloud, and also, migrate from <code>alien4cloud 1.2.1</code> to <code>alien4cloud 1.3.x</code>.</p>
35
35
36
36
<h2id="downloads">Downloads</h2>
37
37
@@ -150,7 +150,7 @@ <h5> Plugins migration </h5>
150
150
<divclass="note warning">
151
151
<h5>Alien4Cloud and ElasticSearch states</h5>
152
152
<p>We recommend to stop Alien4Cloud before performing the migration. <strong>ElasticSearch MUST be up and running</strong>. Alien4Cloud should be restarted once the process is completed. This is quite trivial to do when running in a classical production setup where elasticsearch process is independant from Alien4Cloud ( See <ahref="#/documentation/1.3.0/admin_guide/advanced_configuration.html">advanced configuration</a> for more details ).<br/>
153
-
However, if running in an embedded configuration, you can’t stop Alien4Cloud without stopping ElasticSearch. Then, just make sure the plateform is not used during the process.</p>
153
+
However, if running in an embedded configuration, you can’t stop Alien4Cloud without stopping ElasticSearch. Then, just make sure the plateform is not used during the process.</p>
154
154
</div>
155
155
156
156
<p>In order to migrate Alien4Cloud you must download the <ahref="http://fastconnect.org/maven/service/local/artifact/maven/redirect?r=fastconnect&g=alien4cloud&a=alien4cloud-migration&v=LATEST&p=zip&c=distrib" title="migration-tool"> migration tool </a> and copy it on the machine where Alien is running (or anywhere which has access to Alien’s data folders).<br/>
Copy file name to clipboardExpand all lines: documentation/1.3.0/admin_guide/ha.html
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ <h5>Premium feature</h5>
36
36
<p>This section refers to a premium feature.</p>
37
37
</div>
38
38
39
-
<p>When deploying A4C in a production environment, you may want to be sure it will be available 24/7, even in case of crashes. We provide a plugin that manages high availability for A4C using a primary/backup mode.</p>
39
+
<p>When deploying A4C in a production environment, you may want to be sure it will be available 24/7, even in case of crashes. We provide a plugin that manages high availability for A4C using a primary/backup mode.</p>
40
40
41
41
<divclass="note warning">
42
42
<p>Note that this page focus only on A4C HA: we don’t consider HA for orchestrators components (managers …) in this page.</p>
<p>Our HA solution is based on a primary/backup mecanism: you’ll need to deploy several instances of A4C to ensure one will be available at a given time.</p>
48
48
49
-
<p>The <em>alien4cloud-premium-ha</em> plugin leverages on <ahref="https://www.consul.io">Consul</a> features:</p>
49
+
<p>The <em>alien4cloud-premium-ha</em> plugin leverages on <ahref="https://www.consul.io">Consul</a> features:</p>
50
50
51
51
<ul>
52
-
<li>Key/Value Storage: a distrubuted key/value is used to determine which A4C instance is the leader.</li>
52
+
<li>Key/Value Storage: a distrubuted key/value is used to determine which A4C instance is the leader.</li>
53
53
<li>Failure Detection: Consul is in charge of checking the liveness of A4C instances.</li>
54
54
</ul>
55
55
56
-
<p>As a consequence, to use this plugin you will need a Consul server (but you’ll probably use a consul cluster !).</p>
56
+
<p>As a consequence, to use this plugin you will need a Consul server (but you’ll probably use a consul cluster !).</p>
57
57
58
58
<p>Since A4C use ElasticSearch as a backend server, you’ll need to setup a remote server (instead of launching an embedded one), and you’ll probably prefer to setup an ElasticSearch cluster with replicated nodes.</p>
59
59
@@ -77,7 +77,7 @@ <h2 id="how-a4c-works-in-ha-mode">How A4C works in HA mode</h2>
77
77
78
78
<p>A4C will then open a session onto consul and try to acquire a lock onto a consul key. If the lock is already acquired (by another instance), it will still in this boostrap mode and will wait for changes on this key. A health check is associated with the sesssion, so consul will check for the liveness of this A4C instance.</p>
79
79
80
-
<p>When the lock is acquired, this means the current instance is elected as the leader. The whole application context is started, all REST endpoint are available and all the stuffs are waked up. This A4C instance is then fully usable.</p>
80
+
<p>When the lock is acquired, this means the current instance is elected as the leader. The whole application context is started, all REST endpoint are available and all the stuffs are waked up. This A4C instance is then fully usable.</p>
81
81
82
82
<p>If the JVM or the machine crash (or event if an A4C instance can’t reach ElasticSeach), the health check will fail, consul will disable the session, and the lock (if it is associated with this session) will be released. The primary will fall back in backup mode. Another instance will be elected.</p>
Copy file name to clipboardExpand all lines: documentation/1.3.0/admin_guide/post_deployment_application.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ <h5>Premium feature</h5>
36
36
<p>This section refers to a premium feature.</p>
37
37
</div>
38
38
39
-
<p>The Alien post-deployment web application is a Spring boot application, that helps managing patches or operations added to a node within a deployment. You MUST deploy it if you plan on providing to the users the ability to perform <ahref="#/documentation/1.3.0/user_guide/post_deployment.html">post deployment operations</a> on an application.</p>
39
+
<p>The Alien post-deployment web application is a Spring boot application, that helps managing patches or operations added to a node within a deployment. You MUST deploy it if you plan on providing to the users the ability to perform <ahref="#/documentation/1.3.0/user_guide/post_deployment.html">post deployment operations</a> on an application.</p>
0 commit comments