- creates a new virtualbox with masterless saltstack
- install Jenkins with Plugins and job as example
vagrant up
- You need to answer the few question from the installation wizzard.
- done and ready for work
In the VirtualBox, you can find important folders mounted from the host:
- /etc/salt
- /srv/salt/
- /var/www/
- /var/www/jenkins/jobs
Jenkins WebGui is forwared to the host!
- config.vm.network :forwarded_port, guest: 80, host: 8080
- config.vm.network :forwarded_port, guest: 8080, host: 8081
- Java 8
- Jenkins
- Salstack SLS automatic usage of pre-created admin:password from file /var/lib/jenkins/secrets/initialAdminPassword
- plugins
- Github Plugin
- Green Balls
In your composer
load the dev tools you require (i.e. PHPUnit, phpcpd, phpmd, phpcs etc) & have these run via Ant. This will allow one to control the version of the dev tools they use & allow developers to run them locally as well. Allowing Jenkins CI to focus on Continuous Integration.
- Composer.json (composer)
- phpunit.xml (phpunit)
- build.xml (ant)
- job-config.xml (jenkins ci)
- composer.json
- composer.lock
- tests/phpunit.xml
- tests/build.xml
- tests/build/.gitignore (git ignore this directory contents - will contain code coverage etc)
- tests/job-config.xml
If you want to see a full list of what Salt is doing you can add the following line to the VagrantFile
salt.verbose = true
Or use flag below when running vagrant command
--debug
vagrant ssh
Box update and pre-configure with:
salt-call state.highstate
install plugins:
salt-call state.sls jenkins-plugins
install jobs:
salt-call state.sls jenkins-jobs