In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Git Engineering Development Practice (VII)--GitLab Service Building
Operating System: RHEL 7.3 WorkStation
1. Introduction to GitLab 1. Introduction to GitLab
GitLab is an open source version management system developed using Ruby on Rails. It is an open source git repository management software that integrates code hosting, testing, and deployment. It can be accessed through a web interface for public or private projects. GitLab has the ability to browse code, manage bugs and comments, manage team access to repositories, easily browse committed versions, and provide a file history repository, making it a popular R & D version control system.
Git: Native version control system tool.
Github: The world's largest online code hosting repository, https://github.com.
GitLab: Support for online code hosting, support for private code hosting server deployment.
2. Continuous integration function of GitLab
Gitlab-CI stands for GitLab Continuous Integration.
Since version 8.0 of Gitlab, Gitlab has fully integrated Gitlab-CI and is enabled by default for all projects.
Continuous integration functionality is provided in GitLab 8.0+, and there is a concept of Runners in GitLab.
There are three types of runners.
1)Local Runner
2)Runner on a regular server
3)Docker-based Runner
GitLab schematic:
3. Service Composition of Gitlab
Nginx: Static web server
gitlab-shell: Used to process Git commands and modify the list of authorized keys
gitlab-workhorse: lightweight reverse proxy server
logrotate: log file management tool
postgresql: database
redis: cache database
sidekiq: Used to execute queue tasks in the background (asynchronous execution)
unicorn: An HTTP server for Rack applications on which GitLab Rails applications are hosted
4. GitLab Common Commands
Gitlab commands are divided into two parts: general commands and service management commands
Syntax: gitlab-ctl command parameters
General Command:
The command parameters are as follows:
Help: Help
reconfigure: Reload configuration after modifying configuration file
show-config: View all service profile information
uninstall: uninstall software
cleanse: delete gitlab data and start again from scratch
Service Management Command:
start: Start all services
stop: Close all services
restart: Restart all services
status: View all service status
tail: View log information
service-list: List all startup services
Graceful-kill: stop a service smoothly
Second, GitLab installation configuration 1, installation configuration GitLab related dependencies
Install dependencies, configure firewall open HTTP and SSH services
sudo yum install -y curl policycoreutils-python openssh-serversudo systemctl enable sshdsudo systemctl start sshdsudo firewall-cmd --permanent --add-service=httpsudo systemctl reload firewalld
If you want to use Postfix to send notification messages, select 'Internet Site' during Postfix installation.
sudo yum install postfixsudo systemctl enable postfixsudo systemctl start postfix
You can also configure an external SMTP server after GitLab has been successfully installed.
2. Add GitLab package repository
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
3. Install GitLab
sudo yum install gitlab-ce-10.7.3-ce.0.el7.x86_64
You need to set the domain name of gitlab, or you can use the ip address.
sudo EXTERNAL_URL="http://gitlab.example.com" yum install gitlab-ce
After completion, modify the file/etc/gitlab/gitlab.rb to set the access url
4. GitLab configuration
sudo gitlab-ctl reconfigure
Initial configuration of GitLab will be slow, wait patiently.
After loading, start Gitlab, which uses ports 80, 8080, and 9090 by default.
Restart gitlab service:
sudo gitlab-ctl restart
The first time you access the web interface after installation, you will be asked to reset the new password for the root account.
Log in to the server with root privileges and start the Ruby on Rails console
gitlab-rails console production
[root@localhost ~]# gitlab-rails console productionLoading production environment (Rails 4.2.8)irb(main):001:0> irb(main): 001:0> user = User.where(id: 1).first=> #irb(main):002:0>user.password = 'secret_pass' irb (main):002:0>user.password_confirmation = 'secret_pass' irb (main): 002:0>user.save5, Register User
Register a new user:
Set information for newly registered users:
Generate SSH public key:
ssh-keygen -t rsa -C "user@qq.com" -b 4096
The SSH public key generated is stored in the ~/.ssh/id_rsa.pub file.
Copy all the contents of id_rsa.pub file to Key edit box:
6. Create a new group
7. New construction
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.