Skip to content

Commit 3d55a7e

Browse files
author
alexey
committed
JE-23548 Inject Jelastic Services to scripting
1 parent 3c0363d commit 3d55a7e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

docs/examples/environment-migration-after-cloning.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@
132132
* JS script for executing actions with the newly cloned environment.
133133
* The script is subscribed on the onAfterClone event and will be executed after old environment cloning.
134134
*/
135-
136135
var APPID = hivext.local.getParam("TARGET_APPID"),
137136
CLONED_ENV_APPID = "${event.response.env.appid}", // placeholder for the cloned environment AppID
138137

@@ -143,8 +142,7 @@ var APPID = hivext.local.getParam("TARGET_APPID"),
143142
NODE_TYPE_CP = "tomcat7", // keyword of the compute node's software stack.
144143
NODE_TYPE_DB = "mysql5", // keyword of the DB node's software stack
145144

146-
HN_GROUP_PROFIT_BRICKS = "pbricks-de", // identifier of the hardware node group a new environment should be migrated to
147-
HN_GROUP_DEFAULT = "default_hn_group"; // second hardware node group's identifier
145+
HN_GROUP_PROFIT_BRICKS = "pbricks-de"; // second hardware node group's identifier
148146

149147
/**
150148
* Adjust application settings according to a new database connection string
@@ -178,13 +176,8 @@ return jelastic.env.file.ReplaceInBody(CLONED_ENV_APPID, session, APP_INDEX_FILE
178176
* @returns {Response}
179177
*/
180178
function migrateEnv(oClonedEnvInfo) {
181-
var sHardwareNodeGroup;
182-
183-
// get current environment hardware node group from environment meta information
184-
sHardwareNodeGroup = oClonedEnvInfo.env.hardwareNodeGroup;
185-
186179
// migrate environment API to another hardware node group
187-
return jelastic.env.control.Migrate(CLONED_ENV_APPID, session, sHardwareNodeGroup, true);
180+
return jelastic.env.control.Migrate(CLONED_ENV_APPID, session, HN_GROUP_PROFIT_BRICKS, true);
188181
}
189182

190183
/**

0 commit comments

Comments
 (0)