This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: newnode | |
remote_user: root | |
become: yes | |
become_method: sudo | |
tasks: | |
- command: bash -c "uname -r | grep ^4." | |
register: kernelversion | |
ignore_errors: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# upgrade kernel | |
- name: upgrade kernel step 1 | |
command: rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
- name: upgrade kernel step 2 | |
command: rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm | |
ignore_errors: yes | |
- name: upgrade kernel step 3 | |
command: yum --enablerepo=elrepo-kernel install -y kernel-lt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage 'checkout' | |
git 'https://gitlab.com/motoskia/hello-world.git' | |
stage 'build' | |
sh 'mvn clean install' | |
stage('Results - 1') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7 | |
RUN yum -y install net-tools qperf | |
ENTRYPOINT ["qperf"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print result | |
echo "" | |
#echo "Upload speed: $up_speed kB/s" | |
#echo "Download speed: $down_speed kB/s" | |
up_mbps=$(echo "scale=0; $up_speed/125" |bc) | |
down_mbps=$(echo "scale=0; $down_speed/125" |bc) | |
echo "" | |
echo "Upload speed: $up_mbps mbps" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node ('master'){ | |
checkout([$class: 'GitSCM', | |
branches: [[name: '*/master']], | |
doGenerateSubmoduleConfigurations: false, | |
extensions: [[$class: 'CleanCheckout']], | |
submoduleCfg: [], | |
userRemoteConfigs: [[credentialsId: 'git-credentials', url: 'https://github.com/user/repo.git']] | |
]) | |
steps { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
// Mark the code checkout 'stage'.... | |
stage 'checkout' | |
// Get some code from a GitHub repository | |
git url: 'https://github.com/test.git' | |
sh 'git clean -fdx; sleep 4;' | |
// Get the maven tool. | |
// ** NOTE: This 'mvn' maven tool must be configured |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
my-qa.movehq.com: | |
build: | |
context: . | |
args: | |
- VIRTUAL_HOST=my-qa.movehq.com | |
- buildno | |
- gitcommithash | |
labels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.bull.javamelody.*; | |
import net.bull.javamelody.internal.model.*; | |
url = "http://myserver:8080/mywebapp/monitoring"; | |
double cpu = new RemoteCall(url).collectGraphLastValue("cpu"); | |
println "cpu = " + cpu; | |
double gc = new RemoteCall(url).collectGraphLastValue("gc"); | |
println "gc = " + gc; | |
java = new RemoteCall(url).collectJavaInformations(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: True | |
become: True | |
tasks: | |
- name: Download Python 3.3 | |
get_url: dest=/var/local url=http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz | |
sudo: yes | |
- name: Ensure Python 3.3 is extracted |