public class CreateBuildSlaveAMI extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CreateBuildSlaveAMI.ImageTagsComparator |
Modifier and Type | Field and Description |
---|---|
static String |
CI_SLAVE_STARTS_WITH_TOKEN |
static Map<String,JenkinsContext> |
CONTEXTS |
static org.kuali.common.core.ssh.KeyPair |
DEVOPS_KEYPAIR |
static com.amazonaws.services.ec2.model.Tag |
name |
static Set<String> |
US_REGIONS |
Constructor and Description |
---|
CreateBuildSlaveAMI() |
Modifier and Type | Method and Description |
---|---|
protected void |
cacheBinaries(org.kuali.common.util.channel.api.SecureChannel channel,
String basedir,
org.kuali.common.util.project.model.ProjectIdentifier pid) |
protected static void |
cleanupAmis(org.kuali.common.aws.ec2.api.EC2Service service,
com.amazonaws.services.ec2.model.Tag stack,
int minToKeep) |
protected void |
configureInstance(org.kuali.common.aws.ec2.api.EC2Service service,
com.amazonaws.services.ec2.model.Instance instance,
List<com.amazonaws.services.ec2.model.Tag> tags,
org.kuali.common.util.project.model.ProjectIdentifier pid,
boolean quiet,
String privateKey,
String dnsPrefix,
String jenkinsMaster,
JenkinsContext jenkinsContext) |
protected void |
copyAmi(String sourceRegion,
Set<String> regions,
String ami,
com.amazonaws.services.ec2.model.Tag stack) |
protected String |
createAndPropagateAMI(com.amazonaws.services.ec2.model.Instance instance,
org.kuali.common.aws.ec2.api.EC2Service service,
BasicLaunchRequest request,
com.amazonaws.services.ec2.model.Tag stack) |
protected static boolean |
exactMatch(com.amazonaws.services.ec2.model.Tag tag,
List<com.amazonaws.services.ec2.model.Tag> tags) |
protected static com.amazonaws.services.ec2.model.Tag |
findRequiredTag(List<com.amazonaws.services.ec2.model.Tag> tags,
String tagKey,
String prefix) |
protected static BasicLaunchRequest |
getBasicLaunchRequest(BasicLaunchRequest provided) |
protected static BasicLaunchRequest |
getBasicLaunchRequest(JenkinsContext context) |
protected static String |
getBuildNumber()
If the environment variable BUILD_NUMBER is set, add a prefix and return, otherwise return System.currentTimeMillis()
|
protected static List<com.amazonaws.services.ec2.model.Tag> |
getCommonTags(com.amazonaws.services.ec2.model.Tag stack) |
protected static org.kuali.common.aws.ec2.api.EC2Service |
getEC2Service(com.amazonaws.auth.AWSCredentials encrypted,
com.amazonaws.regions.Region region) |
protected static List<com.amazonaws.services.ec2.model.Image> |
getFilteredImages(List<com.amazonaws.services.ec2.model.Image> images,
com.amazonaws.services.ec2.model.Tag stack,
String tagKey,
String prefix) |
protected static String |
getJenkinsMaster(JenkinsContext context) |
protected static Map<String,org.kuali.common.aws.ec2.api.EC2Service> |
getServiceMap(com.amazonaws.auth.AWSCredentials credentials,
Set<String> regions) |
protected static List<com.amazonaws.services.ec2.model.Tag> |
getSlaveTags(JenkinsContext context) |
protected static void |
info(String msg,
Object... args) |
protected static com.amazonaws.services.ec2.model.Instance |
launchAndWait(org.kuali.common.aws.ec2.api.EC2Service service,
JenkinsContext ctx,
BasicLaunchRequest blr,
List<org.kuali.common.aws.ec2.model.security.KualiSecurityGroup> securityGroups,
List<com.amazonaws.services.ec2.model.Tag> tags,
String regionName) |
protected static boolean |
matches(List<com.amazonaws.services.ec2.model.Tag> tags,
String key,
String prefix) |
protected static boolean |
matches(com.amazonaws.services.ec2.model.Tag tag,
String key,
String prefix) |
protected static void |
setupEssentials(org.kuali.common.util.channel.api.SecureChannel channel,
String basedir,
org.kuali.common.util.project.model.ProjectIdentifier pid,
org.kuali.common.aws.ec2.model.Distro distro,
String distroVersion,
String aesPassphrase,
String dnsPrefix,
String quietFlag) |
void |
test() |
public static final String CI_SLAVE_STARTS_WITH_TOKEN
public static final com.amazonaws.services.ec2.model.Tag name
public static final org.kuali.common.core.ssh.KeyPair DEVOPS_KEYPAIR
public static final Map<String,JenkinsContext> CONTEXTS
public static final Set<String> US_REGIONS
public CreateBuildSlaveAMI()
protected static String getJenkinsMaster(JenkinsContext context)
protected void configureInstance(org.kuali.common.aws.ec2.api.EC2Service service, com.amazonaws.services.ec2.model.Instance instance, List<com.amazonaws.services.ec2.model.Tag> tags, org.kuali.common.util.project.model.ProjectIdentifier pid, boolean quiet, String privateKey, String dnsPrefix, String jenkinsMaster, JenkinsContext jenkinsContext) throws Exception
Exception
protected String createAndPropagateAMI(com.amazonaws.services.ec2.model.Instance instance, org.kuali.common.aws.ec2.api.EC2Service service, BasicLaunchRequest request, com.amazonaws.services.ec2.model.Tag stack)
protected void copyAmi(String sourceRegion, Set<String> regions, String ami, com.amazonaws.services.ec2.model.Tag stack)
protected void cacheBinaries(org.kuali.common.util.channel.api.SecureChannel channel, String basedir, org.kuali.common.util.project.model.ProjectIdentifier pid)
protected static void setupEssentials(org.kuali.common.util.channel.api.SecureChannel channel, String basedir, org.kuali.common.util.project.model.ProjectIdentifier pid, org.kuali.common.aws.ec2.model.Distro distro, String distroVersion, String aesPassphrase, String dnsPrefix, String quietFlag)
protected static BasicLaunchRequest getBasicLaunchRequest(JenkinsContext context)
protected static BasicLaunchRequest getBasicLaunchRequest(BasicLaunchRequest provided)
protected static void cleanupAmis(org.kuali.common.aws.ec2.api.EC2Service service, com.amazonaws.services.ec2.model.Tag stack, int minToKeep)
protected static com.amazonaws.services.ec2.model.Tag findRequiredTag(List<com.amazonaws.services.ec2.model.Tag> tags, String tagKey, String prefix)
protected static List<com.amazonaws.services.ec2.model.Image> getFilteredImages(List<com.amazonaws.services.ec2.model.Image> images, com.amazonaws.services.ec2.model.Tag stack, String tagKey, String prefix)
protected static boolean exactMatch(com.amazonaws.services.ec2.model.Tag tag, List<com.amazonaws.services.ec2.model.Tag> tags)
protected static boolean matches(List<com.amazonaws.services.ec2.model.Tag> tags, String key, String prefix)
protected static boolean matches(com.amazonaws.services.ec2.model.Tag tag, String key, String prefix)
protected static List<com.amazonaws.services.ec2.model.Tag> getSlaveTags(JenkinsContext context)
protected static List<com.amazonaws.services.ec2.model.Tag> getCommonTags(com.amazonaws.services.ec2.model.Tag stack)
protected static com.amazonaws.services.ec2.model.Instance launchAndWait(org.kuali.common.aws.ec2.api.EC2Service service, JenkinsContext ctx, BasicLaunchRequest blr, List<org.kuali.common.aws.ec2.model.security.KualiSecurityGroup> securityGroups, List<com.amazonaws.services.ec2.model.Tag> tags, String regionName)
protected static Map<String,org.kuali.common.aws.ec2.api.EC2Service> getServiceMap(com.amazonaws.auth.AWSCredentials credentials, Set<String> regions)
protected static org.kuali.common.aws.ec2.api.EC2Service getEC2Service(com.amazonaws.auth.AWSCredentials encrypted, com.amazonaws.regions.Region region)
protected static String getBuildNumber()
Copyright © 2004–2014 The Kuali Foundation. All rights reserved.