Pleasanter Version Upgrade Procedure (Azure App Service)
## Overview
Procedure for Pleasanter upgrade version operated by Azure App Service.
## Notes
1. Do not overwrite the currently operational parameter file with the latest version. Newly added parameters in the latest version may be lost, causing Pleasanter to fail to start.
1. If you are using the Enterprise Edition and have extended columns, follow the "Enterprise Edition Upgraded Pleasanter Upgrade Procedure" provided in the "Support Contract Subscriber Content" for the upgrade.
## Prerequisites
1. If you are upgrading from Pleasanter 1.3 or earlier to Pleasanter 1.4 or later, you need to install [.NET8 installation](https://pleasanter.org/manual/install-dotnet).
## Procedure
The upgrade procedure is as follows:
1. Backup Database
1. Backup Parameter File
1. Prepare Pleasanter
1. Prepare Application
1. Reconfigure Parameters
1. Reconfigure Extensions
1. Place Pleasanter
1. Stop Pleasanter
1. Deploy Application
1. Run CodeDefiner
1. Confirm the Start of Pleasanter
## 1. Backup Database
Backup the database. **If you have upgraded to Enterprise Edition and expanded columns, make sure to back them up.**
[Pleasanter User Manual - FAQ: Backup, Restore](https://pleasanter.org/manual?category=5580)
## 2. Backup Parameter File
1. Backup the parameter file. This backup will be used in step 3.2. If you set up the parameter file according to the manual, it will be a json file under C:\home\sites\wwwroot\Implem.Pleasanter\App_Data\Parameters\.
1. **This step is not necessary if you are not using the extension.** Back up the parameter file set by the extension. This backup will be used in step 3.3. If you set up the file according to the manual, the file will be in the following subfolder under C:\home\sites\wwwroot\Implem.Pleasanter\App_Data\Parameters\.
|Subfolder name|Extension name|Notes|
|:---|:---|:---|
|CustomDefinitions|"「Extended Column」"|Folder created when adding columns to dept, group, or user|
|ExtendedFields|"[Extended Field](/en/manual/extended-fields)"||
|ExtendedHtmls|"[Extended HTML](/en/manual/table-management-extended-html)"||
|ExtendedNavigationMenus|"「Extended Navigation Menu」"||
|ExtendedScripts|"[Extended Script](/en/manual/extended-script)"||
|ExtendedServerScripts|"「Extended Server Script」"||
|ExtendedSqls|"「Extended SQL」"||
|ExtendedStyles|"[Extended Style](/en/manual/extended-style)"||
## 3. Prepare Pleasanter
### 1. Prepare Application
1. Download the latest version of Pleasanter from the [Download Center](https://pleasanter.org/dlcenter).
1. Unzip the downloaded zip file.
### 2. Reconfigure Parameters
Apply the current settings to the parameter file of the latest version module prepared in step 3.1. Use a file comparison/merging tool such as [WinMerge](https://winmergejp.bitbucket.io/) to compare the parameter file of the latest version module with the parameter file of the backup file obtained in step 2, and modify the parameter file of the latest version module.
### 3. Reconfigure Extensions
**This step is not required if you are not using extensions.** Apply the current settings to the extension parameter file of the latest version module prepared in step 3.1. Use a file comparison/merging tool such as [WinMerge](https://winmergejp.bitbucket.io/) to compare the extension parameter file of the latest version module with the extension parameter file of the backup file obtained in step 2, and modify the extension parameter file of the latest version module.
## 4. Place Pleasanter
### 1. Stop Pleasanter
1. Connect to the [Azure Portal](https://portal.azure.com/).
2. Open App Service.
![image](https://pleasanter.org/binaries/147ddd6eab944a19821b76908fea20d0)
3. Select the App Service instance that you created.
4. Stop App Service.
### 2. Deploy Application
1. Access [Kudu](https://docs.microsoft.com/ja-jp/azure/app-service/resources-kudu#access-kudu-for-your-app).
1. In the App Service left menu, click "Developer Tools" and then "Advanced Tools".
![image](https://pleasanter.org/binaries/e5ad500f62394017a6ddce3ee66c695a)
2. Click on the "Move" link
![image](https://pleasanter.org/binaries/c1d6026dfa6643489428bc71d65882f2)
3. From the Kudu header menu, click "Debug console" > "CMD"
![image](https://pleasanter.org/binaries/2ff4ca0e974341059f98f681b1f5e6a9)
4. Click "site" from the directory list. After selecting it, confirm that the prompt is C:\home\site\.
![image](https://pleasanter.org/binaries/78b88b789ab947089f8623c76f6858fb)
2. Go to the "pleasanter" folder of the latest version module whose parameters were reconfigured in step 3.2.
3. Rename the “Implem.Pleasanter” folder to “wwwroot”.
4. Compress the wwwroot folder in zip format and save it as "wwwroot.zip".
5. Rename the "Implem.CodeDefiner" folder to "CodeDefiner".
6. Zip the CodeDefiner folder and save it as "CodeDefiner.zip".
7. Drag and drop wwwroot.zip and CodeDefiner.zip into the Kudu Size target and verify that they are extracted and stored.
![image](https://pleasanter.org/binaries/d29c80d097814b73861508a899ad7975)
* Just to be on the safe side, we recommend backing up the existing C:\home\site\wwwroot\ and C:\home\site\CodeDefiner\ by renaming them to C:\home\site\wwwroot_bk\ and C:\home\site\CodeDefiner_bk\, respectively, before deploying the new version.
## 5. Run CodeDefiner
1. Select CodeDefiner from the Kudu directory listing and verify that the prompt is C:\home\site\CodeDefiner.
2. Run CodeDefiner by executing the following command:
```
dotnet Implem.CodeDefiner.dll _rds /p C:\home\site\wwwroot
```
## 6. Confirm the Start of Pleasanter
1. Open App Service and start the instance.
1. Open Pleasanter login screen in your browser, log in, and click "Help" - "Version" in the navigation menu to confirm that the version is correct.
![image](https://pleasanter.org/binaries/0d80470fa83c40bd99c057d2447549e0)