whoami: Robert Harker
Linux Systems Administrator/DevOps Engineer.
- Early Sun Microsystems employee supporting Sun's corporate IT infrastructure
.
- 30 years experience building the Internet.
- 10+ years teaching Internet protocols and email infrastructure.
- Last 7 years managing web farms, working with DevOps teams, Yahoo, UGO.
Open Data Evangelist.
- Working as a volunteer on San Mateo County's Open Data portal
- I have a wide range of operational experience:
Web technology, Internet protocols,
Data center server operations, DevOps software development process.
Caution: I am a Linux ops guy not a PHP programmer.
Please make an accommodation to my severe allergic reaction to Power Point
Slides prepared using vi and W3C Slidy,
A presentation system/template implemented in 6 file CSS styles sheets and
one Java script.
Continuous Integration and Agile Development
Continuous Integration
Using automation to dynamically rebuild and validate code each time a change is made
Automation is key:
- Rebuild/validate[/deploy] happens automatically based on tools
Agile Development
Releasing early and often
- Continuous deployments
- Periodic releases:
- Weekly feature releases
- Daily bug fix releases
People can generally clearly remember changes in the last 2-3 weeks
Simple or Complex environment?
Simple environment:
All in one:
Jenkins CI and build server, unit/integration testing, public web server.
Complex development environment:
Build chain
A set of environments (hosts) that the updated code is migrated through
- Build server: generates installable packages, unit tests
- Dev integration server: Current latest and greatest.
- Test integration server: Known working server.
- Ops deployment server: One step before production release
- Production environment: Public facing
The Build
Build can refer to:
- The current compiled project
- The process of compiling, packaging, testing[, deploying] the project
- The logs or artifacts for a particular build
CI Server -vs- Build System
Separate knowledge of building the code from automation of build process
CI server:
- Jenkins, Hudson, Mamboo, etc
Knowledge about the Environment (operations)
Build system
- Composer, Ant, Rake, Mavin, make
Knowledge about the Source Structure (development)
CI server contains operational information:
- What is the configuration of the build environment
- What environment are we building
- What branch are we building
Build scripts:
- Git repo including build scripts
- Build scripts can be run as standalone programs separate from the CI server
Pass run time parameters via environment settings
- ENV['FTP'] = "ftp.server.name"
What is jenkins?
Orchestration tool:
Jenkins is a comprehensive CI framework
- Browser based
- Users/security
- Projects
- Branches
- Jobs
- Drill-down build artifact exploration
- Artifact/log management
Jobs and Builds
Defines job:
- Environment
- Condition to trigger job
- Steps to complete job, build script:
- Build/validate/deploy commands
Automatically build job:
- Automatic trigger
- Build result: pass/warning/fail
- Build artifacts:
- Output from build/validate/deploy commands
Jenkins Overview
Architectural components
Dashboard:
Installing Jenkins
Linux:
Follow instructions on:
- https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins
Hints:
- Add yourself to group jenkins
- Configure to auto start
- Open firewall port
Windows:
Mac:
Left as an exercise to the user
Start Jenkins Java process
- service jenkins start; service jenkins status
- systemctl start jenkins; systemctl status jenkins
Secure Jenkins
First step is to secure jenkins
- Connect to jenkins:
- From the main dashboard:
- Manage Jenkins -> Configure Global Security
- Choose:
- Access Control -> Jenkins’ own user database
- Enable:
- Save
Once you have saved "Allow users to sign up" option you are in a security window:
- Anyone can create an account and make any changes
Create your own account
In the upper right corner you should see:
Select and create your own account
Login with this new account
Disable "Allow users to sign up":
- Manage Jenkins -> Configure Global Security
Disable:
Save
You have closed security window
New users can be added with:
- Manage Jenkins -> Manage Users -> Create User (left column)
PHP code
GitHub plugin:
GitHub API Plugin
GIT client plugin
GIT plugin
Plain Credentials
Notice jenkins shows status of installation
Jenkins Job
Discussion:
Questions?
Thank You
Thank Yous:
view source
Robert Harker
<harker@harker.com>