Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

riversyang/ykh-ci-server-config-sample

Repository files navigation

ykh-docker-ci-server-config

This is a project for setting up CI server of YunKuHui microservices with CentOS.

Install vsftpd

yum install vsftpd
adduser ftpuser
passwd ftpuser

Then you should modify [/etc/vsftpd/vsftpd.conf], make the following changes.

...
anonymous_enable=NO
...
ascii_upload_enable=YES
ascii_download_enable=YES
...
#chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
...
(Add the following setting to the end of the file)
allow_writeable_chroot=YES

Add file [/etc/vsftpd/chroot_list] with the following contents.

ftpuser

And enable it as system service, start it.

systemctl enable vsftpd
systemctl start vsftpd

Install Docker

Follow the official instruction in https://docs.docker.com/engine/installation/linux/docker-ce/centos/ to install Docker CE.

After installation, remember to enable docker as system service.

systemctl enable docker

Create network for deployment.

docker network create -d bridge --subnet 172.25.0.0/16 backend-nw
docker network create -d bridge --subnet 172.26.0.0/16 frontend-nw

Install nodejs and npm

To install nodejs and npm, you can just use following command. You may also need to install cnpm while you are in China.

yum install nodejs npm --enablerepo=epel
npm install cnpm -g --registry=https://registry.npm.taobao.org

Install Git

yum install git

Install Maven

yum install maven

Install MongoDB

Follow the official instruction in https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ to install MongoDB.

Install Java

yum install java-1.8.0-openjdk

Setup Jenkins

Download jenkins.war from offcial site, and put it in [/home/jenkins]. Create a service setting file [/etc/systemd/system/jenkins.service] with the following contents.

[Unit]
Description=jenkins
After=network.target
[Service]
ExecStart=/usr/bin/java -jar jenkins.war --httpPort=8080
Restart=always
RestartSec=1
User=root
Group=root
Environment=PATH=/usr/bin:/usr/local/bin
WorkingDirectory=/home/jenkins
[Install]
WantedBy=multi-user.target

Reload systemctl config and enable it as startup service.

systemctl daemon-reload
systemctl enable jenkins
systemctl start jenkins

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published