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
kops edit --help | |
kops edit ig --name $NAME nodes | |
# Change `spec.maxSize` and `spec.minSize` to `2`, save, and exit. | |
kops update cluster --name $NAME --yes | |
kops validate cluster |
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
source kops | |
export BUCKET_NAME=devops23-$(date +%s) | |
export KOPS_STATE_STORE=s3://$BUCKET_NAME | |
aws s3api create-bucket \ | |
--bucket $BUCKET_NAME \ | |
--create-bucket-configuration \ | |
LocationConstraint=$AWS_DEFAULT_REGION |
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
/* | |
Set yourself up: | |
1) Install SDKMAN - http://sdkman.io/ | |
2) Install Groovy: sdk install groovy | |
3) Start the groovy console by typing: groovyConsole | |
*/ | |
// Single line comments start with two forward slashes |
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
#create the cluster | |
##These include Jenkins a CI/CD pipeline solution | |
##Nexus - an artifact repository | |
##Chartmuseum - a Helm Chart repository | |
##Monocular which provides a Web UI for searching and discovering charts deployed into your cluster via Jenkins X. | |
#jx create cluster gke --cluster-name='jx-acaternberg' --labels='created-by-acaternberg' | |
#jx create cluster gke --skip-login --default-admin-password=mySecretPassWord123 -n jx-acaternberg | |
jx create cluster gke | |
#create a spring-boot application |
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
# nexus 2.x | |
# Assuming you run this command against the directory the jar sits in | |
# | |
# r - repository | |
# hasPom - whether you are supplying the pom or you want one generated. If generated g, a, v, p, and c are not needed | |
# e - extension | |
# g - group id | |
# a - artifact id | |
# v - version | |
# p - packaging |
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
#!groovy | |
/** | |
API Base URL - by default it’s https://bitbucket.org/api | |
API Version - 1.0 or 2.0 | |
API Endpoint Path - includes the following | |
“repositories” - since we want to use one of the repositories API | |
Organization Name - aka team or account name | |
Repository Name - repository slug | |
Repositories API Endpoint - branches since we want to get list of branches | |
*/ |
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
###################### | |
# Create The Cluster # | |
###################### | |
az login | |
az provider register -n Microsoft.Network | |
az provider register -n Microsoft.Storage |
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
see https://jfrog.com/knowledge-base/how-to-configure-artifactory-as-an-internal-jenkins-update-site/ | |
* Create a remote repo named Jenkins-update | |
* Create a local repo named jenkins-update-center | |
* Get the update-center.json from repo Jenkins-update to local and modify the URL from 'http://updates.jenkins-ci.org/' to my own URL 'https://artifacts.xxx.com/artifactory/Jenkins-update/' in update-center.json, then put update-center.json into local repo. | |
``` | |
#!/bin/sh | |
curl -L -o /tmp/update-center.json http://localhost:8081/artifactory/Jenkins-update-cache/update-center.json | |
sed -i 's#http://updates.jenkins-ci.org/#https://artifacts.xxx.com/artifactory/Jenkins-update/#g' /tmp/update-center.json |
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
#create the cluster | |
jx create cluster eks -n $CLUSTER_NAME \ | |
--default-admin-password admin123! | |
These include # | |
-> Jenkins as CI/CD pipeline solution | |
-> Nexus - an artifact repository | |
-> Chartmuseum - a Helm Chart repository | |
-> Monocular which provides a Web UI for searching and discovering charts deployed into your cluster via Jenkins X. |
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 com.cloudbees.plugins.credentials.CredentialsProvider | |
import com.cloudbees.plugins.credentials.Credentials | |
import com.cloudbees.plugins.credentials.domains.Domain | |
import jenkins.model.Jenkins | |
def indent = { String text, int indentationCount -> | |
def replacement = "\t" * indentationCount | |
text.replaceAll("(?m)^", replacement) | |
} | |
Jenkins.get().allItems().collectMany{ CredentialsProvider.lookupStores(it).toList()}.unique().forEach { store -> |