Skip to content

apolloclark/jenkins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins - Pipeline

Demo of the Jenkins Pipeline plugin, using Vagrant to run an Ubuntu 14.04 LTS 64-bit instance, locally using Virtualbox, or remotely using Amazon. It will pull down and use whatever the latest Jenkins Stable build is.

alt text

Docker-compose, run Server and Clients

# run Server and Client Docker images
docker-compose up
# open a browser: http://127.0.0.1:8080/

# job/PipelineDemo/
# click "Build Now"

# shutdown
docker-compose stop

# cleanup
docker-compose rm -f

Docker, run Server

# change dir
cd jenkins-server

# build
docker build --no-cache=true -t apolloclark/jenkins-server .

# run
docker run -it -p 8080:8080 -p 50000:50000 apolloclark/jenkins-server

# open a browser: http://127.0.0.1:8080/job/PipelineDemo/
# click "Build Now"

Vagrant

# change dir
cd jenkins-server

# install the vagrant aws provider
vagrant plugin install vagrant-aws

# copy the example AWS config
cp -f aws-config-example.yml aws-config.yml

# run
vagrant up
# open a browser: http://127.0.0.1:8080/job/PipelineDemo/
# click "Build Now"

Deploy to Amazon

# install the vagrant aws provider
vagrant plugin install vagrant-aws

# clone the repo
git clone https://github.com/apolloclark/vagrant-jenkins-pipeline
cd vagrant-jenkins-pipeline

# copy the example AWS config, customize
cp -f aws-config-example.yml aws-config.yml


# run
vagrant up --provider=aws
# open a browser: http://<ec2_ip_addr>:8080/job/Python_Pipeline/
# click "Build Now"


# create SSH port forwarding tunnel
ssh -L 8080:127.0.0.1:8080 admin@<ec2-dns> -i <aws_key_file>

# create SSH port forwarding tunnel without a Terminal
ssh -nNT -L 8080:127.0.0.1:8080 admin@<ec2-dns> -i <aws_key_file>

Jenkins Logs

watch tail -n 32 /var/log/jenkins/jenkins.log

Painite attacks

# scan the local network
nmap -sn -vv 172.17.0.1/24

# TCP SYN port scan a specific IP
nmap -sS -vv 172.17.0.2

# attempt to connect
curl -i  http://172.17.0.2:8008/1677330664470980985/ | less

# list all the DIRB wordlists
ls -lah /usr/share/dirb/wordlists/
ls -lah /usr/share/dirb/wordlists/others
ls -lah /usr/share/dirb/wordlists/vulns

# run the dirb attack, filter out responses that are 250 bytes
dirb http://172.17.0.2:8008/1677330664470980985/ \
    /usr/share/dirb/wordlists/common.txt -f \
    | grep -v 250

Configure for Programming Language

There are multiple sub-projects within the ./data folder, which are Quickstarts for various programming languages and web frameworks. You can edit the Vagrantfile to install language specific code quality tools, and enable language specific Build projects.

Links