# Upgrading Petro.ai
When regular updates become available they should be downloaded from Petro.ai Portal. Administrators are notified via email as updates are made available.
# Regular Maintenance
Ruths.ai recommends first running the update process in a test environment, verifying the success of the update, and then running the same update for the production environment.
Server Maintenance
If regular server maintenance is needed on the deployed Petro.ai machines, all Petro.ai resources should be gracefully shutdown to ensure data and software are not corrupted. For PetroManager and PetroWorker instances, simply stop the Windows service. For PetroDatabase follow the MongoDB documentation for shutdown.
# Summary
| Feature | Steps |
|---|---|
| Petro.ai Server | 1. Install new .zip 2. Configure serve-config.json 3. Create new service (different executable, new location) |
| Comments Service | 1. Install new .zip 2. Configure serve-config.json 3. Create new service (different executable, new location) |
| Portal | 1. Give administrator the role "Organizational Administrator" |
# Step-by-step
The update process requires the following steps to be followed in order on the PetroManager and PetroWorker machines:
Download the new Petro.ai package
- Navigate to the Petro.ai Portal and search
petroor, - go directly here and download Petro.ai.
- Navigate to the Petro.ai Portal and search
Turn off Petro.ai Services
- Press the Windows key then search ‘services’ and press Enter.
- Navigate to the Manager or Worker service.
- Right-click and select ‘Stop’ to stop the service.
Replace files
- Navigate to
%ProgramFiles%\Petro.aito find the manager or worker directory. - Extract the downloaded files from step one, copy them into the directory, and select the replace all option. This will update all the necessary files except the config.json file.
- Navigate to
Turn on Services
- Press the Windows key then search ‘services’ and press Enter.
- Navigate to the Manager or Worker service.
- Right-click and select ‘Start’ to start the service.
Check for Database Migration
- After the update, navigate to PetroSuite > Info to check if a database migration needs to be performed.
- If a migration is needed, create a new migration job in PetroSuite > Jobs Manager > Create New Job and run immediately.
Update Spotfire Extensions to match versions
Verify that the changes are satisfactory
# Specific Upgrade Paths
There have been some significant architectural changes in the transition from 3.4.1 to 4.x versions. Our authentication system has been simplified to use the Petro Portal which is tied to either an Office365 account or a standalone Petro.ai account. This is also the same licensing that is used for the Spotfire Extensions.
TLS/SSL Security for MongoDB
At this time we are strongly encouraging the use of TLS for Mongo instances. You can find the instructions for configuring these settings at Configure mongod and mongos for TLS/SSL
# Upgrading from Legacy PetroDB Standalone to Petro.ai 4.x
This upgrade path only pertains to users coming from the legacy deployment of the DCA Wrangler-generated Petro.ai database.
- Run the PAI Command-line Migration on localhost DB
RAI.PetroCore.CommandLine.exe --migrate
- Upload the new .spks on the Spotfire Server
- Ensure that your organization has an account on the new portal.petro.ai. If using Office365 for login, your Azure administrator must consent to the Petro.ai application. An administrator can use this link to initialize that integration.
- The organization administrators assigns users to subscriptions.
- Remove the Spotfire license keys from the Administration Manager.
- Update any required security protocols:
- If standalone, self-sign (with option for their certificate).
- Update relevant connection strings in the Spotfire Administration Manager.
# Upgrading from Petro.ai 3.4.1 to Petro.ai 4.x
This is the most common upgrade path. The following is a summary of the migration, please contact Petro.ai Support to perform this upgrade.
# Database
Run the Petro CLI migration on localhost DB
RAI.PetroCore.CommandLine.exe --migrate
# Manager/Worker
- Extract the new zips into the original directories of Petro.ai
- Update the manager-config
- New connection string from the database
- New portal block
- New logging block
- Remove the license in the manager-config
New portal block
"Portal": {
"Uri": "https://portal.petro.ai/",
"AppId": "ac7b8a9b78ea9c8ba798baec789",
"SecretKey": "aec7a87ce9b8a7ec9b8aeba9ec8b7",
"EnvironmentId": "yKHwF3uBfpsJk4JFG",
"HeartbeatMsInterval": 5000
},
New logging block
"Logging": {
"LogLevel": {
"Default": "Information"
}
},
- Update Windows Service to reflect the new paths of the applications.
# Portal
- Upgrade .spks on Spotfire
- For the organization on portal.petro.ai
- Create an administrator for your organization, ensure that this user account has the "organization admin" role.
- Create all the users
- If using Office365 for login, your Azure administrator must consent to the Petro.ai application. An administrator can use this link to initialize that integration.
- The organization administrator must assign users to a subscription.
- Remove the Spotfire license keys from the Administration Manager.
- Update any required security protocols:
- If standalone, self-sign (with option for their certificate).
- Update relevant connection strings in the Spotfire Administration Manager.