Hey! I made this vagrant environment using ansible_local
provisioner (in case you have Windows as host OS).
This code creates and provisions 3 VMs in VirtualBox using Vagrant and Ansible:
- app (192.168.77.21): sample application (hostname: app.explorium)
- registry (192.168.77.22): docker registry (hostname: registry.explorium)
- jenkins (192.168.77.23): jenkins master (hostname: jenkins.explorium)
SSH user/pass for all vms
User: root
Password: explorium
Port: 22
alternatively you can use:
vagrant ssh app
vagrant ssh registry
vagrant ssh jenkins
Jenkins URL: https://jenkins.explorium Registry: https://registry.explorium App: https://app.explorium
The packages you need to install on your host machine in order to run this code:
VirtualBox (latest)
Vagrant (latest)
It would be good idea to add these host entries to your hosts file:
192.168.77.21 app.explorium app
192.168.77.22 registry.explorium registry
192.168.77.23 jenkins.explorium jenkins
It's very simple and straightforward.
To run this code do the steps below:
git clone https://github.com/gothicfann/explorium-demo
cd explorium-demo/
vagrant up
wait for it to finish provisioning all three vms.
At the end of Jenkins provisioning Initial Admin Password
will be printed to the terminal. Copy it!
- Visit the Jenkins URL (https://jenkins.explorium) using browser and use
Initial Admin Password
to unlock it. - Install all suggested plugins.
- Sign up or continue with admin user.
- Click
create new jobs
. Set some name for project, choosePipeline
,clickOK
. - At the bottom from dropdown menu choose
Pipeline script from SCM
. ChooseGit
as SCM. - Paste following github repository url: https://github.com/gothicfann/angular-realworld-example-app.
- Save pipeline and run build. Wait for it to finish.
- Check new version of application on: https://app.explorium
This Angular project is forked from https://github.com/gothinkster/angular-realworld-example-app.
Note: As this demo lab is running using Vagrant and VirtualBox, Github Webhook triggers cannot be applied. In that case Jenkins instance needs to be accessable from Internet.
This project is tested on Linux (Fedora 31). It should work also on Windows too (but have not tested).
Thanks!
Irakli Korpashvili