Skip to content

Commit 1cf8716

Browse files
authored
Merge pull request #39 from sych74/v2.2.0
V2.2.0 Opensearch support
2 parents b8b5c35 + 0b6ff81 commit 1cf8716

File tree

7 files changed

+34
-41
lines changed

7 files changed

+34
-41
lines changed

manifest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
jpsType: install
22
jpsVersion: '1.7.4'
3-
id: magento-v210
3+
id: magento
44
name: Magento Standalone
55
homepage: http://www.magentocommerce.com/
66
description:
@@ -12,7 +12,7 @@ categories:
1212

1313
logo: /images/magento.png
1414

15-
baseUrl: https://raw.githubusercontent.com/jelastic-jps/magento/v2.1.0
15+
baseUrl: https://raw.githubusercontent.com/sych74/magento/v2.2.0
1616

1717
onBeforeInit: /scripts/beforeinit.js?_r=${fn.random}
1818
onBeforeInstall: /scripts/beforeinstall.js?_r=${fn.random}
@@ -110,7 +110,7 @@ onAfterMigrate:
110110
domain: ${env.domain}
111111

112112
globals:
113-
SCRIPTS_PATH: https://raw.githubusercontent.com/jelastic-jps/magento-cluster/v2.1.0/scripts
113+
SCRIPTS_PATH: https://raw.githubusercontent.com/jelastic-jps/magento-cluster/v2.2.0/scripts
114114
DB_USER: jelastic-${fn.random}
115115
DB_PASS: ${fn.password(10)}
116116
DB_HOST: 127.0.0.1

scripts/beforeinit.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ var extIP = "environment.externalip.enabled",
3535
extIPperEnv = "environment.externalip.maxcount",
3636
extIPperNode = "environment.externalip.maxcount.per.node",
3737
maxCloudletsPerRec = "environment.maxcloudletsperrec",
38-
isDocker = "environment.docker.enabled",
38+
maxEnvs = "environment.maxcount",
39+
envsCount = jelastic.env.control.GetEnvs({lazy: true}).infos.length,
3940
markup = "", cur = null, text = "used", LE = true, prod = true;
4041

41-
var quotas = jelastic.billing.account.GetQuotas(extIP + ";"+extIPperEnv+";" + extIPperNode +";" + maxCloudletsPerRec +";" + isDocker).array;
42+
var quotas = jelastic.billing.account.GetQuotas(extIP + ";"+extIPperEnv+";" + extIPperNode +";" + maxCloudletsPerRec +";" + maxEnvs).array;
4243
for (var i = 0; i < quotas.length; i++){
4344
var q = quotas[i], n = toNative(q.quota.name);
4445

45-
if (n == isDocker && !q.value){
46-
err(q, "required", 1, true);
47-
prod = false;
46+
if (n == maxEnvs && envsCount >= q.value){
47+
err(q, "already used", envsCount, true);
48+
prod = false; break;
4849
}
4950

5051
if (n == maxCloudletsPerRec && q.value < 32){

scripts/beforeinstall.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ if ('${settings.ls_addon:false}'== 'true') {
4444
}
4545

4646
resp.nodes.push({
47-
nodeType: "docker",
47+
nodeType: "opensearch",
4848
count: 1,
4949
flexibleCloudlets: ${settings.st_flexibleCloudlets:16},
5050
fixedCloudlets: ${settings.st_fixedCloudlets:1},
51-
nodeGroup: "elasticsearch",
52-
dockerName: "elasticsearch",
53-
dockerTag: "7.12.1",
54-
displayName: "Elasticsearch",
55-
env: {
56-
ES_JAVA_OPTS: "-Xms512m -Xmx512m",
57-
ELASTIC_PASSWORD: "${globals.ES_PASS}",
58-
JELASTIC_EXPOSE: "9200"
51+
nodeGroup: "nosqldb",
52+
displayName: "OpenSearch",
53+
cluster: {
54+
is_opensearchdashboards: false,
55+
success_email: false,
5956
}
6057
})
6158

success/email/lemp/oneregion-cdn.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ Use the following credentials to access the admin panel:
88
**Login**: admin
99
**Password**: ${globals.MG_ADMIN_PASS}
1010

11-
Use the following credentials to access the Elasticsearch admin panel:
12-
13-
**Admin Panel**: [http://docker${nodes.elasticsearch.master.id}-${env.domain}](http://docker${nodes.elasticsearch.master.id}-${env.domain})
14-
**Username**: elastic
15-
**Password**: ${globals.ES_PASS}
16-
1711
Manage the database nodes using the next credentials:
1812

1913
**phpMyAdmin Panel**: [https://${env.domain}:8443/](https://${env.domain}:8443/)
2014
**Username**: ${globals.DB_USER}
2115
**Password**: ${globals.DB_PASS}
2216

17+
Use the following credentials to access the OpenSearch:
2318

19+
**Access URL**: [http://node${nodes.nosqldb.master.id}-${env.domain}:4949](http://node${nodes.nosqldb.master.id}-${env.domain}:4949)
20+
**Login**: admin
21+
**Password**: ${globals.ES_PASS}

success/email/lemp/oneregion-default.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ Use the following credentials to access the admin panel:
66
**Login**: admin
77
**Password**: ${globals.MG_ADMIN_PASS}
88

9-
Use the following credentials to access the Elasticsearch admin panel:
10-
11-
**Admin Panel**: [http://docker${nodes.elasticsearch.master.id}-${env.domain}](http://docker${nodes.elasticsearch.master.id}-${env.domain})
12-
**Username**: elastic
13-
**Password**: ${globals.ES_PASS}
14-
159
Manage the database nodes using the next credentials:
1610

1711
**phpMyAdmin Panel**: [https://${env.domain}:8443/](https://${env.domain}:8443/)
1812
**Username**: ${globals.DB_USER}
1913
**Password**: ${globals.DB_PASS}
2014

15+
Use the following credentials to access the OpenSearch:
16+
17+
**Access URL**: [http://node${nodes.nosqldb.master.id}-${env.domain}:4949](http://node${nodes.nosqldb.master.id}-${env.domain}:4949)
18+
**Login**: admin
19+
**Password**: ${globals.ES_PASS}

success/email/llsmp/oneregion-cdn.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ Use the following credentials to access the LiteSpeed WEB Server admin console:
1414
**Login**: admin
1515
**Password**: ${globals.LS_ADMIN_PASS}
1616

17-
Use the following credentials to access the Elasticsearch admin panel:
18-
19-
**Admin Panel**: [http://docker${nodes.elasticsearch.master.id}-${env.domain}](http://docker${nodes.elasticsearch.master.id}-${env.domain})
20-
**Username**: elastic
21-
**Password**: ${globals.ES_PASS}
22-
2317
Manage the database nodes using the next credentials:
2418

2519
**phpMyAdmin Panel**: [https://${env.domain}:8443/](https://${env.domain}:8443/)
2620
**Username**: ${globals.DB_USER}
2721
**Password**: ${globals.DB_PASS}
2822

23+
Use the following credentials to access the OpenSearch:
24+
25+
**Access URL**: [http://node${nodes.nosqldb.master.id}-${env.domain}:4949](http://node${nodes.nosqldb.master.id}-${env.domain}:4949)
26+
**Login**: admin
27+
**Password**: ${globals.ES_PASS}

success/email/llsmp/oneregion-default.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ Use the following credentials to access the LiteSpeed WEB Server admin console:
1212
**Login**: admin
1313
**Password**: ${globals.LS_ADMIN_PASS}
1414

15-
Use the following credentials to access the Elasticsearch admin panel:
16-
17-
**Admin Panel**: [http://docker${nodes.elasticsearch.master.id}-${env.domain}](http://docker${nodes.elasticsearch.master.id}-${env.domain})
18-
**Username**: elastic
19-
**Password**: ${globals.ES_PASS}
20-
2115
Manage the database nodes using the next credentials:
2216

2317
**phpMyAdmin Panel**: [https://${env.domain}:8443/](https://${env.domain}:8443/)
2418
**Username**: ${globals.DB_USER}
2519
**Password**: ${globals.DB_PASS}
2620

21+
Use the following credentials to access the OpenSearch:
22+
23+
**Access URL**: [http://node${nodes.nosqldb.master.id}-${env.domain}:4949](http://node${nodes.nosqldb.master.id}-${env.domain}:4949)
24+
**Login**: admin
25+
**Password**: ${globals.ES_PASS}

0 commit comments

Comments
 (0)