6471.BuildDiary 2019R4 CloneServer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Test system Build Diary

2019 R4 (V12 patch 19) Clone a single-server instance

Updated: 17/11/2021 Page 1 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Disclaimer
This document is provided "as is" and is for your guidance and educational purposes only. It does not
replace the Online documentation, nor is any warranty expressed nor implied for the steps described
herein.

Document Information
Author: Mike Shaw, Sage UK X3 Support Team

Contents
Introduction .................................................................................................................................................. 3
2019 R4 – Clone single-server TEST instance build diary.............................................................................. 4
Objective ................................................................................................................................................... 4
Starting architecture and notes ................................................................................................................ 4
Documentation to use for planning and execution of this task ............................................................... 5
Initial steps ................................................................................................................................................ 6
Configure software for new server name ................................................................................................. 7
Change X3 specific setup ........................................................................................................................ 12
Finishing steps ......................................................................................................................................... 13
Conclusion ................................................................................................................................................... 14

Updated: 17/11/2021 Page 2 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Introduction
What is a ”Build Diary”
A Build Diary simply describes the steps taken by Sage Support to perform a task or tasks on our internal
test systems. Build diaries could be created for major multi-node installations, but may also just be
describing the steps taken when installing a small hotfix, or anything in-between.

Why is this being shared


It may be useful for you to see the steps we have taken to create or implement some feature or
installation, as this may highlight “gotcha’s”, issues encountered or just give you some guidance if you
are planning something similar yourself.

You could potentially use these documents as the base for your own “Workplan document” (Described
in “Overview of patching X3 and supporting technologies” https://www.sagecity.com/gb/sage-x3-
uk/b/sage-x3-uk-support-insights/posts/sage-x3-technical-support-tips-and-tricks---march-2021-index )
when you are planning your own activities

Target Audience
This document is aimed at Sage X3 Certified Technical consultants. Sage prescribe that X3 system
installation, maintenance, migrations, etc. should be performed by suitably qualified Sage X3
consultants. The prerequisite consideration would be for them to have the latest “Sage X3 Certified
Technical Consultant” certification. You can read more about the Sage X3 qualifications and
requirements in Sage University ( https://sageu.csod.com/catalog/CustomPage.aspx?id=20000242#tc )

Additional things to note


• This document does NOT purport to illustrate “best practice” for the task being described
• The steps described will not necessarily be for a “perfect” task, as there may have been issues
that needed to be overcome, worked around, or ignored
• The Sage internal test system has network and hardware configuration specific to Sage
• The Sage internal test system does not necessarily include a Windows Domain and has Sage
sandbox specific Windows security setup, so operating system permissions are generally not
discussed
• If you intend to use these notes as a guide for your own activities, use with caution and perform
your own testing to ensure the described steps are suitable and identify any additional
considerations that apply to your own situation
• Ensure you only install and use software you are licensed for

What does this Build Diary describe?


This build diary primarily describes cloning a single server TEST instance

Updated: 17/11/2021 Page 3 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
2019 R4 – Clone single-server TEST instance build diary

Objective
I want to clone an existing single-node Sage X3 instance, by creating a copy of an existing TEST server
and then renaming the Clone server to a different Windows server name.

Starting architecture and notes


Single Windows server (Original server name SAGE-EMV12)
Software already loaded:
Windows Server 2016
SQL Server 2016
OpenJDK 1.8.0_282
Edge, Firefox and Chrome browsers
7-Zip 19.00
Apache 2.4
SQL Server Management Studio 2016 (13.0.16106.4)
Windows users setup (Local users)
“x3admin” for installation and management
“X3run” for service runtime
Sage X3 versions being used for this test
X3 2019 R4 (12.0.19)
Runtime/AdxAdmin 91.5.74
X3 Console 2.43.0.34
Print Server 2.18.38
Syracuse 12.4.0.16-0
MongoDB 3.4.16
ElasticSearch 6.4

Summary of steps to clone single-node server


• Change Windows server name
• Re-configure SQL Server
• Re-configure MongoDB
• Re-configure Syracuse
• Re-configure Elastic Search
• Re-configure Apache
• Re-configure Classic components
• Change X3 specific setup
• Take backup, then do lots of testing

Updated: 17/11/2021 Page 4 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Documentation to use for planning and execution of this task

Sage Online documentation


Overall V12 documentation
http://online-help.sageerpx3.com/erp/12/public/index.html

Pre-requisites
http://online-help.sageerpx3.com/erp/12/public/Prerequisites-(Last-version).html
http://online-help.sageerpx3.com/erp/12/public/prerequisites_overview.html

Sage Blogs and Knowledgebase articles


How can I clone a Sage X3 server? https://www.sagecity.com/gb/sage-x3-uk/b/sage-x3-uk-support-
insights/posts/how-can-i-clone-a-sage-x3-server

Which firewall ports need to be open in a multi-node environment


https://support.na.sage.com/selfservice/viewdocument.do?externalId=102936

Updated: 17/11/2021 Page 5 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Initial steps
The first step is to clone an existing TEST VM server “SAGE-EMV12” then rename the cloned Windows
Server

As my source instance is an existing TEST server, I will simply shutdown the source VM to ensure there is
no problem when I bring up and configure the cloned VM. I’ll leave the source VM shutdown until I have
finished configuring and setting up my clone VM. (For a LIVE server setup, you would probably want to
check the firewall rules will block all but required traffic into the LIVE server; to prevent any cross-over
from the Clone; and make sure the clone VMs are similarly configured)

Once the clone has been created it comes up with its own IP address. Change the Windows server name
to “CLONESERVER” then restart it for the change to take effect. I am now ready to configure my
software components for this change of server name.

Updated: 17/11/2021 Page 6 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Configure software for new server name

Preamble
Shutdown all Sage X3 related services. In my case this is Syracuse, Elastic Search, MongoDB, Runtime,
Print Server, AdxAdmin (Any other Sage X3 component are outside the scope of this document, but
would also need to be stopped)

Shutdown Apache service

SQL Server
Check SQL server is running
Connect via SSMS

Run the following


select @@SERVERNAME
This will show the original name

I now need to run the following commands to remove the original name and create new entry for the
new server name:
EXEC sp_dropserver 'SAGE-EMV12\X3DATASQL2K16';
GO
EXEC sp_addserver 'CLONESERVER\X3DATASQL2K16', local;
GO

Then restart SQL Server service. Finally run the following to confirm the change has taken effect:

select @@SERVERNAME
sp_helpserver

Updated: 17/11/2021 Page 7 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
MongoDB
The mongoDB SSL certificates need to be regenerated with the new hostname. I am using the SSL
certificate scripts available via GitHub to Sage Business Partners to create these new certificates.

Manually copy over the new certificates

Check/change mongodb.conf config file.


Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any occurrences
of the source server IP address, which would also need to be changed if found. In my case there
is nothing to do for this step.

Update for the new SSL certificate names

Startup MongoDB service

I am using the “Investigation Scripts” also available via GitHub to Sage Business Partners for the next two
steps:

Use “mzRunMongoDump.cmd” script to dump mongodb data as a backup.

Use “mzRunMongoExport.cmd” to export the following collections to an ASCII file: Host, EndPoint,
BatchServer, X3solution
Edit the resulting JSON text files:
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any occurrences
of the source server IP address, which would also need to be changed if found.
Re-import the changes using “mzRunMongoImport.cmd”
NOTE: these changes can equally be done by direct update using mongo shell or your favorite
GUI tool, but I think it’s safer and more repeatable to follow the above steps

Syracuse
Edit nodelocal.js
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any
occurrences of the source server IP address, which would also need to be changed if
found.

Regenerate the internal certificates


▪ Run certgen.bat to create new certificates for the CLONESERVER server name
▪ Copy the new certificates over manually to new directory
“C:\Sage\SafeX3\EMV12SYRSVR\syracuse\certs\cloneserver”
▪ Run “win32_x64\node nanny passphrase <Password>” to reset the passphrase

Updated: 17/11/2021 Page 8 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
• Copy over the PEM file to the runtime keys directory

Startup Syracuse service


Check it has started OK and you can login (Runtime isn’t started at this point)

Elastic Search
Edit the config file “elasticsearch.yml”
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any
occurrences of the source server IP address, which would also need to be changed if
found.

Startup the Elastic Search service

Apache
Edit the config file “httpd.conf”
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any
occurrences of the source server IP address, which would also need to be changed if
found.

Startup the Apache server service

Classic components
Edit the following files.
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any
occurrences of the source server IP address, which would also need to be changed if
found.

..\AdxAdmin\inst\adxinstalls.xml
..\AdxAdmin\inst\listsolutions.xml
..\Folders\solution.xml and ..\Folders\X3_PUB\solution.json
c:\users\USERNAME\AppData\Roaming\Sage\Console\reports.xml
c:\users\USERNAME\AppData\Roaming\Sage\Console\adxaccounts.xml
c:\users\USERNAME\AppData\Roaming\Sage\Console\solutions.xml
c:\users\USERNAME\AppData\Roaming\Sage\Console\webs.xml
Updated: 17/11/2021 Page 9 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Print server
.\Config\adxeditionserversolutions.xml
.\tools\ADXADMIN\adxeditionserver_setadxsols_DEFAULT.xml
.\tools\ADXADMIN\adxeditionserver_config.ini

Reconfigure via X3 console


Start AdxAdmin service
Connect to Solution then click “Application” to reconfigure

Updated: 17/11/2021 Page 10 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Update Print Server
Click “Configuration”

Go to “Publications” and click “Apply”

Updated: 17/11/2021 Page 11 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Change X3 specific setup

Login to X3 front end

Review and update any parameters at folder level that point to the old IP or hostname
Change any occurrences of “SAGE-EMV12” to “CLONESERVER”. Also check for any occurrences
of the source server IP address, which would also need to be changed if found.

Edit and run “mzCheckParams.sql”

In my case, I need to change SUP, WRK, AWRKSYRA (Syracuse server) for all folders (X3 and SEED done)

Update Destinations (Parameter, Destinations, Destinations)


Re-save each destination with the correct server name (from the List Of Values)

As my source instance was already a TEST server, I don’t need to update email addresses.

Updated: 17/11/2021 Page 12 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Finishing steps
Shutdown all Cloned servers. This not only allows for a cold backup to be taken, but will also check
there are no problems caused by cached settings.

Take a cold backup to ensure you can get back to this point if needed

Restart the VM and test everything!

Updated: 17/11/2021 Page 13 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.
Conclusion
This “Build diary” document documents my experience of cloning a TEST VM by copying the source VM
to the target VM and then renaming the target VM to a different server name (and IP address)

Whilst Sage Support do not provide direct assistance with cloning, hopefully this article has given you
some pointers and ideas of what to consider.

Updated: 17/11/2021 Page 14 of 14 BuildDiary_2019R4_CloneServer.pdf

©2021 The Sage Group plc or its licensors. All rights reserved. Sage, Sage logos, and Sage product and service names mentioned herein are the trademarks of
Sage Global Services Limited or its licensors. All other trademarks are the property of their respective owners.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy