From ba3070f1359f20a3d1d6f52b7b9ca3d22991c376 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 30 May 2020 22:55:57 +0300 Subject: [PATCH] Add proper README.md, Add LICENSE.md --- LICENSE.md | 21 +++++++++++++++++++++ README.md | 40 ++++++++++++++++++++++++++++++---------- 2 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..e9c28fb --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Fanakis Apostolos + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index cfe3376..0a54495 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,37 @@ -## Deployment +# Janus +> A Dockerized Jenkins CI-CD system for Apella -To deploy the Jenkins server use the commands: -```bash +Janus is a Docker image that contains an instance of Jenkins with all the necessary configuration built into it for handling the CI-CD of Apella. + +## Prerequisites + +Only needs a working installation of Docker. + +## Installation + +The credentials of the default admin user created are passed to Jenkins using docker secrets. The files containing the username and password to be used can be found at the paths `./jenkins/secrets/user` and `./jenkins/secrets/pass` respectively. Edit the files to change the default username and password. + +Then run: + +```sh make build make run ``` -To get the administrator password created use the command: -```bash -docker exec jenkins_master_1 cat /var/jenkins_home/secrets/initialAdminPassword +During the Docker image build, a key-pair is created for usage with Gitlab. Get the public ssh key using: + +```sh +./utility-scripts/printJenkinsGitlabSSHPublicKey.sh ``` -Remove **all** images: -```bash -docker images -q | xargs docker rmi -f -``` \ No newline at end of file +Then, on Gitlab, add the public key to the deploy keys of the project. + +Jenkins also needs an access token from Gitlab to update build statuses. Create an access token and add it to Jenkins under Global Credentials. + +Lastly a Webhook must be added to Gitlab, pointing to the Jenkins project. On Gitlab, navigate to the Webhooks menu in the Settings of the project and add a new webhook pointing to `https://jenkins.apella.tk/project/staging-apella-multibranch-pipeline`. + +## Contact + +Apostolof – apotwohd@gmail.com + +Distributed under the MIT license. See ``LICENSE`` for more information.