Serial articles
The Beginning of DevOps Bullet Zero
DevOps First Bomb Project and Transaction Tracking Tool
Deployment of Private Git Server in DevOps II
Efficiency Communication of DevOps Third Bullet
Interface Document of DevOps Fourth Bomb
DevOps Fifth Bullet's Continuous Integrated Compilation Environment (Android)
DevOps Fifth Bullet Continuous Integration Jenkins (Android)
DevOps Fifth Bullet Continuous Integration Flow-ci (Android)
The Tool Integration of DevOps Sixth Bomb
brief introduction
Gitlab is often used to deploy private Git servers, but gitlab is too heavy (mainly for my server environment). In fact, generally as a git server or ci server performance should not be too bad, at least running gitlab is no problem. As a demonstration, I used gogs instead of gitlab. This is Amway Docker. Here's a demonstration installation with Docker.
step
1. Docker Installation and Operation
2. Installing gogs
3. gogs initialization
4. gogs Simple Use
1. Docker Installation and Operation
apt-get install docker.io docker-compose service docker start
2. Installing gogs
Pull the gogs image down from the Docker repository and run the container. Map port 22 to port 9022 and port 3000 to port 9000.
docker pull gogs/gogs mkdir -p /var/gogs-git docker run -it --name=gogs -p 9022:22 -p 9000:3000 gogs/gogs
output
root@iZwz9f0sget2ecg5evg6gfZ:/opt/gogs# docker run -it -p 9022:22 -p 9000:3000 gogs/gogs usermod: no changes Dec 15 03:06:04 syslogd started: BusyBox v1.25.1 2017/12/15 03:06:05 [ WARN] Custom config '/data/gogs/conf/app.ini' not found, ignore this if you're running first time 2017/12/15 03:06:05 [TRACE] Custom path: /data/gogs 2017/12/15 03:06:05 [TRACE] Log path: /app/gogs/log 2017/12/15 03:06:05 [TRACE] Build Time: 2017-11-22 08:19:49 UTC 2017/12/15 03:06:05 [TRACE] Build Git Hash: 2017/12/15 03:06:05 [TRACE] Log Mode: Console (Trace) 2017/12/15 03:06:05 [ INFO] Gogs 0.11.34.1122 2017/12/15 03:06:05 [ INFO] Cache Service Enabled 2017/12/15 03:06:05 [ INFO] Session Service Enabled 2017/12/15 03:06:05 [ INFO] SQLite3 Supported 2017/12/15 03:06:05 [ INFO] Run Mode: Development Dec 15 03:06:05 sshd[31]: Server listening on :: port 22. Dec 15 03:06:05 sshd[31]: Server listening on 0.0.0.0 port 22. 2017/12/15 03:06:05 [ INFO] Listen: http://0.0.0.0:3000
We exit the container by pressing ctrl+p+q, and then use docker ps to view the running container
root@iZwz9f0sget2ecg5evg6gfZ:/opt/gogs# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 70cfdfc6eca3 gogs/gogs "/app/gogs/docker/..." 11 seconds ago Up 10 seconds 0.0.0.0:9022->22/tcp, 0.0.0.0:9000->3000/tcp gifted_curran
3. gogs initialization
Visit http://120.78.191.35:9000
Several changes are needed:
Database type: choose sqlite or configure other databases yourself
Domain name: domain name or IP, no port number
ssh port number: ssh port, default 22, because we are mapping the past, so write 9022
HTTP port number: Ibid., write 9000
Application URL: This is not very clear what to do. Write the address of Web access.
Administrator Account Settings: Self-configuring
4. gogs Simple Use
Click on the above to install immediately and then log in to create the project.
Simple to use
Last
Later, Git events and efficiency communication tools will be synchronized with WebHook technology, and it is necessary to trigger the CI environment to compile and package into the application market.