From version < 101.1 >
edited by Jonathan Rubiero
on 2018/05/04 11:24
To version < 102.1 >
edited by Jonathan Rubiero
on 2018/05/04 11:26
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -888,261 +888,3 @@
888 888  ~> db.dropDatabase()
889 889  { "dropped" : "step", "ok" : 1 }
890 890  )))
891 -
892 -= Migration - FULL RUN =
893 -
894 -* Stop the running instance
895 -** If you installed STEP component as service, just stop the services.
896 -** If not, make sure to kill the associated Java processes (1 for the controller, 1 per agent).
897 -* Perform a full backup of the STEP database : use the following command to output the backup to the //backup// folder:
898 -* (% class="box" %)
899 -(((
900 -mongodump -d step -o backup
901 -)))
902 -* If you have installed any of STEP components as service, you should uninstall them prior to moving forward.
903 -* Download the STEP binaries from [[https:~~/~~/github.com/denkbar/step/releases/latest>>url:https://github.com/denkbar/step/releases/latest]]
904 -
905 -== Controller ==
906 -
907 -(((
908 -* Extract the controller binaries to the desired location, for example to **C:\STEP\step-controller-X.Y.Z**
909 -* Compare the controller //**step.properties **//configuration files and add any entries missing in the new one
910 -** Make sure the demo setting is set to "false"
911 -** Make sure the path to the "Parameter.js" file is up to date
912 -** Make sure the different plugins configuration file paths are up to date
913 -* Compare the //**Parameters.js **//configuration file and add any entries missing in the new one
914 -* Compare the //**ScreenTemplate.js **//configuration file and add any entries missing in the one
915 -
916 -=== Plugins installations ===
917 -
918 -For every plugins you are using you will have to copy the plugin binaries into the new controller lib folder and tweak the controller //**step.properties**// configuration file. See below instructions for each plugin.
919 -
920 -==== HP ALM ====
921 -
922 -* First, the following jar files have to be copied on the controller, under **...\step-controller-//X.Y.Z//\lib\**
923 -** **alm-plugin-//X.Y.Z//.jar**
924 -** **alm-repository-//X.Y.Z//.jar**
925 -* The following lines must be taken from the old controller //**step.properties**// configuration file and copied to new one, located at **...\step-controller-//X.Y.Z//\conf\step.properties.**
926 -* (% class="box" %)
927 -(((
928 -almrepository.daemon.javapath=**C:\YOUR\JAVA\PATH\java.exe**
929 -almrepository.daemon.calltimeout=1200000
930 -almrepository.profile.prod.url=http:~/~/**<ip>**/qcbin/
931 -almrepository.profile.prod.user=<**//user>//**
932 -almrepository.profile.prod.pwd=<**//password>//**
933 -almrepository.bdd.parsers=step.repositories.parser.annotated.DefaultDescriptionStepParser,step.repositories.parser.CustomExpectedStepParser,step.repositories.parser.CustomDescriptionStepParser
934 -
935 -attachmentsdir=**C:~\~\path~\~\to~\~\attachments**
936 -)))
937 -
938 -==== SoapUI ====
939 -
940 -* First, the following jar files have to be copied on the controller, under **...\step-controller-//X.Y.Z//\lib\**:
941 -** **soapui-plugin-def-//X.Y.Z//.jar**
942 -** **soapui-plugin-handler-//X.Y.Z//.jar**
943 -* The following lines must be taken from the old controller //**step.properties**// configuration file and copied to new one, located at **...\step-controller-//X.Y.Z//\conf\step.properties.**
944 -* (% class="box" %)
945 -(((
946 -plugins.soapui.home=**C:/YOUR/SOAPUI/PATH/SoapUI-5.4.0**
947 -)))
948 -
949 -==== JMeter ====
950 -
951 -* The following lines must be taken from the old controller //**step.properties**// configuration file and copied to new one, located at **...\step-controller-//X.Y.Z//\conf\step.properties.**(% class="box" %)
952 -(((
953 -plugins.jmeter.home=**C:/YOUR/JMETER/PATH/apache-jmeter-4.0/**
954 -)))
955 -
956 -==== .NET Plugin ====
957 -
958 -* Copy the //**dotnet-plugin-X.Y.Z.jar** //file to **...\step-controller-//X.Y.Z//\lib\**
959 -
960 -==== Node.js ====
961 -
962 -* Copy the **node-plugin-X.Y.Z.jar **file to **...\step-controller-//X.Y.Z//\lib\**
963 -
964 -* (((
965 -Restart the controller
966 -)))
967 -
968 -* Install the controller as a service if you need to
969 -* Start the controller
970 -* Create missing parameter in the GUI if needed
971 -)))
972 -
973 -* Agents :
974 -** Compare the agent //**AgentConf.json**// configuration files and add any entries missing in the new one. Repeat this operation for all agents.
975 -** If you have installed custom libraries in the agent //**bin **//folder, copy them to the new agent //**bin **//folder. Repeat this operation for all agents.
976 -** Install the agents as a service if you need to
977 -** Start the agents
978 -* Migrate the keywords code if you need to and redeploy them
979 -* Execute some test plans and make sure they are running fine
980 -* Check that the plugins are working properly
981 -
982 -In order to perform a safe migration, a new STEP instance should be installed alongside an existing one, just by choosing different ports to run the database, the controller, and the agents. Once the new instance is up-and-running and you've verified that your test scenarios are working, all you will have to do is shutdown (and delete, if necessary) the old instance and switch the services and ports to the old ones.
983 -
984 -The packages required to install the new instance come from two sources:
985 -
986 -- our github repository release page, which contains the core open source installation packages: [[https:~~/~~/github.com/denkbar/step/releases/latest>>url:https://github.com/denkbar/step/releases/latest]]
987 -- our private ftp, which contains enterprise packages and plugins. Enterprise users will directly receive private links to these packages by email.
988 -
989 -The following documentation will assume you have an original STEP instance configured to use default port numbers:
990 -
991 -* port 27017 for the database
992 -* port 8080 and 8081 for the controller
993 -
994 -We will then install a new instance of STEP using different ports.
995 -
996 -== Database - Backup ==
997 -
998 -(Full dump ??)
999 -
1000 -In order to migrate the data, first step to execute is to perform a backup of your work which is stored in the following collections :
1001 -
1002 -* functions (your keywords)
1003 -* artefacts (your tests plans)
1004 -* users (the users your created)
1005 -* tasks (the plans you scheduled)
1006 -
1007 -So you can run the following commands in a terminal to export all this collections into json files :
1008 -
1009 -(% class="box" %)
1010 -(((
1011 -mongoexport ~-~-port 27017 -d step -c functions -o functions.json
1012 -mongoexport ~-~-port 27017 -d step -c artefacts -o artefacts.json
1013 -mongoexport ~-~-port 27017 -d step -c users -o users.json
1014 -mongoexport ~-~-port 27017 -d step -c tasks -o tasks.json
1015 -)))
1016 -
1017 -If you also would like to export the test plan executions, you will also have to export the views, measurements, reports and executions collections (be careful as this might be a lot of data and can consume a huge amount of disk space) using the following commands :
1018 -
1019 -(% class="box" %)
1020 -(((
1021 -mongoexport ~-~-port 27017 -d step -c views -o views.json
1022 -mongoexport ~-~-port 27017 -d step -c measurements -o measurements.json
1023 -mongoexport ~-~-port 27017 -d step -c executions -o executions.json
1024 -mongoexport ~-~-port 27017 -d step -c reports -o reports.json
1025 -)))
1026 -
1027 -**We highly recommend to perform a purge of your data before executing a migration**. Please refer to the [[purge section>>doc:||anchor="complete_purge"]] of this document.
1028 -
1029 -== Database - Start a new instance ==
1030 -
1031 -Add how to start a new MongoDB instance.
1032 -
1033 -
1034 -Now that the data have been saved, you can start a new instance of MongoDB on a different port that the current one in use.
1035 -
1036 -For this follow the documentation on the [[MongoDB official page>>https://docs.mongodb.com/manual/installation/]]. We will assume that the port used for the new instance will be **27018**, instead of 27017 which is the default port number.
1037 -
1038 -== Controller and agents - Backup and Configuration ==
1039 -
1040 -
1041 -Now that we have an empty database running on port 27018, you can download the STEP binaries from [[this link>>https://github.com/denkbar/step/releases/latest]] and extract them on the new installation location. (Add details)
1042 -
1043 -If you have stored any data under the controller data directory (like an Excel dataset file or a script file), do not forget to copy it on the new location.
1044 -
1045 -(% class="box infomessage" %)
1046 -(((
1047 -If you decided to also migrate your executions data, do not forget to copy the **attachments **folder to your new installation. It is usually stored at //controller/bin/attachments. //Refer to the [[controller section>>doc:||anchor="controller"]] for more details about its folder tree structure.
1048 -)))
1049 -
1050 -Before starting the Controller, we will tweak its configuration in order to :
1051 -
1052 -* change the database port to access
1053 -* change the GUI port as another instance is already running on the default port
1054 -* change the Grid port as another instance is already running on the default port
1055 -
1056 -(You can refer to the controller [[configuration section>>doc:||anchor="controller_conf"]] for more details)
1057 -
1058 -You can now make a diff of the content of the old "conf" folder and the new one, and add any configuration entry missing to the new one (remember to check all files !). Once done, you will need to tweak the new //step.properties// configuration file to change the following settings :
1059 -
1060 -* db.port=**27018**
1061 -* port=**18080 **(or any port you have choosen)
1062 -* grid.port=**18081 **(or any port you have choosen)
1063 -
1064 -Regarding the agent configuration, you can also make a diff between the old "conf" folder and the new one (there should be only the "AgentConf.json" file) and add any configuration entry missing to the new one. Once done,you will need to tweak the new "AgentConf.json" configuration file and change the following setting :
1065 -
1066 -* "gridHost":"http:~/~/controller:**18081**" (of any port you have choosen for the Grid)
1067 -
1068 -You can now start the new controller and agent and verify the instance** is running properly on port 18080**. On first startup the controller will create the step database and its associated collections into your new MongoDB instance.
1069 -
1070 -You can refer to the following sections for [[controller startup>>doc:||anchor="controller_restart"]] and [[agent startup>>doc:||anchor="agent_restart"]].
1071 -
1072 -== Database - Restore ==
1073 -
1074 -
1075 -You can now restore your data by executing the following steps :
1076 -
1077 -* stop your agent and controller
1078 -* restore your work using the following commands (use the files generated by the backup previously done)
1079 -
1080 -(% class="box" %)
1081 -(((
1082 -mongoimport ~-~-port 27018 -d step -c functions functions.json
1083 -mongoimport ~-~-port 27018 -d step -c artefacts artefacts.json
1084 -mongoimport ~-~-port 27018 -d step -c users users.json
1085 -mongoimport ~-~-port 27018 -d step -c tasks tasks.json
1086 -)))
1087 -
1088 -* eventually restore your test executions data using the following commands :
1089 -
1090 -(% class="box" %)
1091 -(((
1092 -mongoimport ~-~-port 27018 -d step -c views views.json
1093 -mongoimport ~-~-port 27018 -d step -c measurements measurements.json
1094 -mongoimport ~-~-port 27018 -d step -c executions executions.json
1095 -mongoimport ~-~-port 27018 -d step -c reports reports.json
1096 -)))
1097 -
1098 -* start again controller and agent
1099 -* check that your instance is properly running on port **27018 **
1100 -
1101 -== Plugins - Installation ==
1102 -
1103 -
1104 -If you used any STEP plugins, you will have to install them on the new instance by following [[this page>>doc:Versions.3\.6\.x.Plugins.WebHome]].
1105 -
1106 -== Services - Installation ==
1107 -
1108 -
1109 -if you previously installed STEP components as service, you might want to do it for the new instance too Follow below page sections for each component :
1110 -
1111 -* [[database>>doc:||anchor="mongo_service"]]
1112 -* [[controller>>doc:||anchor="controller_service"]]
1113 -* [[agent>>doc:||anchor="agent_service"]]
1114 -
1115 -== Checks ==
1116 -
1117 -
1118 -Be sure to execute various test plans several times in order to check that there is no issue with the new installation.
1119 -
1120 -
1121 -== Old instance uninstallation ==
1122 -
1123 -
1124 -In order to fully remove the previous installation and configure the new one to use the default STEP ports make sure to follow below steps :
1125 -
1126 -* stop the STEP components you installed as a service
1127 -* use nssm to uninstall them, for example if you install the controller with "StepController" as a service name, execute the following command in a terminal :
1128 -** (% class="box" %)
1129 -(((
1130 -nssm remove StepController confirm
1131 -)))
1132 -* change the controller ports used in the new instance to the one used by the old one. This settings are stored in the //controller\conf\step.properties //file and are set as the following values by default:
1133 -** db.port=**27017**
1134 -** port=**8080**
1135 -** grid.port=**8080**
1136 -* change the agent port used in the new instance to the one used by the old one. This setting is stored in the //agent\conf\AgentConf.json //file and is set as the following value by default :
1137 -** "gridHost":"http:~/~/controller:**8081**"
1138 -* delete the controller root folder
1139 -* delete the agent root folder
1140 -* delete the database :
1141 -** start your mongo client and execute the following command :
1142 -*** (% class="box warningmessage" %)
1143 -(((
1144 -BE CAREFUL AS THIS WILL COMPLETELY REMOVE ALL THE STEP DATABASE CONTENT !!!!
1145 -~> use step
1146 -~> db.dropDatabase()
1147 -{ "dropped" : "step", "ok" : 1 }
1148 -)))
Copyright © exense GmbH
v1.0