What I used in this lab ;)
- k3s : https://k3s.io/
- k3s documentation : https://rancher.com/docs/k3s/latest/en/
| job_name=debug-`date +%Y%m%d%H%M%S` | |
| kubectl create job ${job_name} --from cj/myveeva-v118273-app-maint | |
| kubectl label pod -l job-name=${job_name} run=debug | |
| kubectl wait --for condition=Ready pod -l job-name=${job_name} | |
| pod_name=`kubectl get pods -l job-name=${job_name} -o jsonpath='{.items[0].metadata.name}'` | |
| echo "installing tools" | |
| kubectl exec ${pod_name} -- sh -c "apk -q update; apk -q add bash curl jq openssh rsync vim unzip postgresql-client; pip install -q ipython" |
What I used in this lab ;)
Ansible Operator makes it easy for you to write Ansible to package operational knowledge into a Kubernetes application. Ansible Playbook Bundles (APBs) are lightweight application definitions designed to make cloud services available to the Kubernetes Service Catalog through the Automation Broker. This
| #!/bin/sh | |
| if [ "$EUID" -ne 0 ]; then | |
| echo -e "\nPlease run as root\neg. sudo $0 \n" | |
| exit | |
| fi | |
| GITHUB_USERNAME="ebal" | |
| cd `mktemp -d` |
| #!/bin/bash | |
| ## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.** | |
| ## **This updated version has more options and less hardcoded variables.** | |
| # Take one argument from the commandline: VM name | |
| if ! [ $# -eq 1 ]; then | |
| echo "Usage: $0 <node-name>" | |
| exit 1 | |
| fi |
| #!groovy | |
| pipeline { | |
| agent any | |
| //These params will be displayed for user input when running a build, They are also accepted by the API | |
| parameters { | |
| string(name: 'BUILD_HOSTNAME', description: 'The name of the server to build (from Mdb)') | |
| string(name: 'ILO_IP', description: 'The IP address for the server ilo') | |
| booleanParam(name: 'skipOneView', description: 'Skip the OneView stage?', defaultValue: false) |
Suppose you want to inject a credential into a Pipeline script. The cloudbees note does not include Pipeline script examples. https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs
The Jenkins Pipeline Docs' description of the git pushmethod doesn't have an example using injected credentials.
(https://jenkins.io/doc/pipeline/examples/#push-git-repo)
The Snippet generator is helpful, but not not if you try to follow the instructions at: https://wiki.jenkins-ci.org/display/JENKINS/Credentials+Binding+Plugin
| #!/bin/bash | |
| ## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.** | |
| ## **This updated version has more options and less hardcoded variables.** | |
| # Take one argument from the commandline: VM name | |
| if ! [ $# -eq 1 ]; then | |
| echo "Usage: $0 <node-name>" | |
| exit 1 | |
| fi |
| # Install `dnsmasq` and configure for *.test domains | |
| $ brew install dnsmasq | |
| $ vim /usr/local/etc/dnsmasq.conf | |
| # Reload configuration and clear cache | |
| $ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
| $ dscacheutil -flushcache |