? .NET Deployment Guide

ARM64 Pipeline Deployment to Portal Servers


? Overview

This guide covers the complete process for deploying .NET applications from DevOps pipelines to portal servers (portal-001, portal-002, portal-003). Please follow these steps in order for a successful deployment.


?️ Production Deployment Policy

⚠️ CRITICAL - PRODUCTION SAFETY REQUIREMENT

All production deployments MUST be performed with human oversight and verification. This policy ensures:

  • Manual verification at each critical step
  • Real-time monitoring during the deployment process
  • Immediate intervention capability if issues arise
  • Proper validation before proceeding to the next step

Do NOT automate this process completely. Each step should be executed manually with careful observation of system behavior and service health.


Deployment Steps

1. Download ARM64 Package

Download the ARM64 deployment package from your DevOps pipeline artifacts.

Note: Ensure you're downloading the correct ARM64 build for your target environment.

2. Transfer Package to Portal

Use SCP to transfer the downloaded package to the portal server's install directory.

bash
scp [filename] tiber@portal-001:/sites/dotnet/installs/.

⚠️ Important: Replace [filename] with your actual package filename.

3. SSH to Portal Server

Connect to the portal server using SSH with your user account.

bash
ssh portal-001

Available Servers:

  • portal-001
  • portal-002
  • portal-003

4. Switch to Tiber User

Become the tiber user to perform deployment operations.

bash
sudo su - tiber

5. Navigate to Opts Directory

Change to the deployment options directory where applications are extracted.

bash
cd /sites/dotnet/opts

6. Extract Package

Unzip the pipeline package from the installs directory.

bash
unzip ../installs/[filename]

⚠️ Remember: Replace [filename] with your actual package name.

7. Go to Site Root

Navigate to the main dotnet sites directory.

bash
cd ..

8. Verify Site Root Location

Confirm you're in the correct directory before proceeding.

bash
pwd

Expected Output: /sites/dotnet

9. Capture Current State

List current directory contents and note the existing site path for potential rollback.

bash
ls

? Important: Record the current site path in case you need to rollback!

10. Create Symbolic Link

Link the site to the new deployment location using a symbolic link.

bash
ln -nsf [path_to_opts_folder] [name_of_link]

Flags Explained:

  • -n: No dereference of symbolic links
  • -s: Create symbolic link
  • -f: Force (remove existing destination)

11. Verify Link Creation

Visually inspect the symbolic link to ensure it points to the correct location.

bash
ls -ltr

What to Check: Ensure the link points to your new deployment directory.

12. Exit Tiber User

Return to your original user account to restart services.

bash
exit

13. Restart Kestrel Service

Restart the appropriate Kestrel service for your application.

bash
sudo systemctl restart kestrel-[systemname]

? To find service names:

bash
sudo ls /etc/systemd/system/kestrel-*

?️ Production Safety: After restarting the service, verify the application is responding correctly before proceeding to other servers. Check logs and test endpoints to ensure the deployment is successful.

14. Repeat on Other Servers

Execute step 13 (service restart) on the remaining portal servers.

Remaining Servers:

  • portal-002
  • portal-003

⚠️ Critical: Don't forget to restart services on ALL portal servers!

?️ Production Safety: Deploy to servers one at a time, verifying each deployment is successful before moving to the next server. This ensures service availability is maintained throughout the deployment process.


Quick Reference Commands

StepCommandDescription
2scp [filename] tiber@portal-001:/sites/dotnet/installs/.Transfer package
3ssh portal-001SSH to server
4sudo su - tiberSwitch to tiber user
5cd /sites/dotnet/optsGo to opts directory
6unzip ../installs/[filename]Extract package
7cd ..Go to site root
8pwdVerify location
9lsList contents (backup info)
10ln -nsf [path] [link_name]Create symbolic link
11ls -ltrVerify link
12exitExit tiber user
13sudo systemctl restart kestrel-[name]Restart service

Troubleshooting

Common Issues

Permission Denied:

  • Ensure you're using the tiber user for file operations
  • Check file permissions in the installs directory

Service Not Found:

  • Use sudo ls /etc/systemd/system/kestrel-* to list available services
  • Verify the service name matches your application

Symbolic Link Issues:

  • Use ls -la to check existing links
  • Remove broken links with rm [link_name] before creating new ones

Rollback Procedure

If you need to rollback to the previous deployment:

  1. Note the previous path you recorded in step 9
  2. Remove the current link: rm [current_link]
  3. Create link to previous version: ln -nsf [previous_path] [link_name]
  4. Restart services on all servers

Server Information

ServerPurposeNotes
portal-001Primary deployment targetStart deployments here
portal-002Secondary serverRestart services after portal-001
portal-003Tertiary serverRestart services after portal-002

Last Updated: Document current as of latest deployment procedures
Maintained By: DevOps Team
Contact: For questions or issues with this deployment guide