? .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.
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.
ssh portal-001
Available Servers:
- portal-001
- portal-002
- portal-003
4. Switch to Tiber User
Become the tiber user to perform deployment operations.
sudo su - tiber
5. Navigate to Opts Directory
Change to the deployment options directory where applications are extracted.
cd /sites/dotnet/opts
6. Extract Package
Unzip the pipeline package from the installs directory.
unzip ../installs/[filename]
⚠️ Remember: Replace
[filename]
with your actual package name.
7. Go to Site Root
Navigate to the main dotnet sites directory.
cd ..
8. Verify Site Root Location
Confirm you're in the correct directory before proceeding.
pwd
Expected Output: /sites/dotnet
9. Capture Current State
List current directory contents and note the existing site path for potential rollback.
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.
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.
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.
exit
13. Restart Kestrel Service
Restart the appropriate Kestrel service for your application.
sudo systemctl restart kestrel-[systemname]
? To find service names:
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
Step | Command | Description |
---|---|---|
2 | scp [filename] tiber@portal-001:/sites/dotnet/installs/. | Transfer package |
3 | ssh portal-001 | SSH to server |
4 | sudo su - tiber | Switch to tiber user |
5 | cd /sites/dotnet/opts | Go to opts directory |
6 | unzip ../installs/[filename] | Extract package |
7 | cd .. | Go to site root |
8 | pwd | Verify location |
9 | ls | List contents (backup info) |
10 | ln -nsf [path] [link_name] | Create symbolic link |
11 | ls -ltr | Verify link |
12 | exit | Exit tiber user |
13 | sudo 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:
- Note the previous path you recorded in step 9
- Remove the current link:
rm [current_link]
- Create link to previous version:
ln -nsf [previous_path] [link_name]
- Restart services on all servers
Server Information
Server | Purpose | Notes |
---|---|---|
portal-001 | Primary deployment target | Start deployments here |
portal-002 | Secondary server | Restart services after portal-001 |
portal-003 | Tertiary server | Restart 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