Use Git for automatic deployment
Websoft9 follow GitOps Workflow which automates deployment by using Git repositories to manage infrastructure and application configurations, ensuring consistency and version control.
Benefits from Git deployment
Using Git to manage deployment code, commonly known as Infrastructure as Code, offers clear benefits:
-
Version Control: Git's powerful version control tracks and logs every deployment change.
-
Team Collaboration: Git supports multiple developers, improving code quality and reducing errors.
-
Rollback Capability: Git allows easy rollback to previous states if issues arise.
-
Automation and Integration: Git integrates with CI/CD tools, automating processes and speeding delivery.
-
Audit and Compliance: Git provides an immutable history, meeting audit and compliance requirements.
-
Consistency and Standardization: Git ensures all environments use the same deployment code, reducing discrepancies.
-
Security: Git repositories can be configured with access controls to prevent unauthorized changes.
In summary, using Git to manage deployment code is a more scientific choice than managing it directly on servers.
Git Deployment Workflow
The below steps is the standard process for Git deployment:
-
Prepare your server and other infrastructure
-
Prepare software packages not limited to docker image, source code, binaries, etc.
-
Add a Git repository includes install workflow and declarative configuration files for automatic deployment
-
Git push trigger the Git deployment workflow
Tutorial: Use Websoft9 Git
Websoft9 integrated Gitea as the Git deployment platform and maintain its originality.
Gitea is a private, fast, reliable DevOps platform that brings teams and developers high-efficiency but easy operations from planning to production.
Create Git repository automatically
When user install applications from Websoft9 App Store or Websoft9 App Runtime, it will create a Git repository automatically for this application.
Create Git repository manually
You can create Git repository manually by the following:
-
Login to Websoft9 Console, and go the Git dashboard by the left menu
-
Click + New Repository at upper right to start create a Git repository
-
The following settings you should know
- Owner: Select the user you added
- Visibility: Private or Public
Add zip files to Git repository
You can add zip file to Git repository for automatic deployment:
-
Login to Websoft9 Console, and go the Git dashboard by the left menu
-
Open the target repository files browser mode
-
Upload zip file to repository from interface or
git push
command -
Git the raw URL of file as download URL for automatic deployment
Add Git users
There have default user websoft9
for automatic deployment, but this user is not suitable for customized use case.
You can add your Git user by the below steps:
-
Login to Websoft9 Console, and go the Git dashboard by the left menu
-
Enter to Site Administrator > Admin Settings > Identity & Access > User Accounts from at upper right
Manage Git repository
Gitea provides a full range of operations for repositories, including: setting them public or private, authorizing user access, issue management, branch management, and more.
Edit and recover files
There have many methods for manage files of Git repository, it includes:
- Modify file contents
- Upload file
- Delete file
- Get the raw URL of file
- Recover file from history records
Following steps for you to edit and recover files:
-
Login to Websoft9 Console, and go the Git dashboard by the left menu
-
Open the target repository files browser mode
-
Click the edit icon to modify any file
-
Recover file from Operation > Revert
Git related topics
- Gitea docs
- gitops.tech
- A beginner's guide to GitOps and how it works- GitLab
- What is GitOps - Red Hat
- Is GitOps the next big thing in DevOps? - Atlassian
- What is GitOps: The Beginner's Guide - Splunk
- What is GitOps? - DigitalOcean
Troubleshoot
Can not open Git at Websoft9?
If you can not open Git menu at Websoft9 Console, it can be have integration problem caused by the following:
- Default Email address changed or deleted
- The default user's password has been changed