This file contains 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
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
creationTimestamp: null | |
name: perconaxtradbclusters.pxc.percona.com | |
spec: | |
group: pxc.percona.com | |
names: | |
kind: PerconaXtraDBCluster | |
listKind: PerconaXtraDBClusterList |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: aws-container-day-web-c8024530 | |
spec: | |
minReadySeconds: 0 | |
progressDeadlineSeconds: 600 | |
replicas: 2 | |
selector: | |
matchLabels: |
This file contains 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: aws-container-day-web-c8024530 | |
spec: | |
minReadySeconds: 0 | |
progressDeadlineSeconds: 600 | |
replicas: 2 | |
selector: | |
matchLabels: |
This file contains 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
Admin admin = new AdminFactory().addGroup("elip-xap").createAdmin(); | |
GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne(); | |
ElasticSpaceDeployment deployment = new ElasticSpaceDeployment("mySpace"); | |
// deploy a 3,1 cluster. | |
// this should be default use just 2 containers | |
deployment.memoryCapacityPerContainer(768, MemoryUnit.MEGABYTES); | |
deployment.maxMemoryCapacity(4608, MemoryUnit.MEGABYTES); | |
gsm.deploy(deployment); |
This file contains 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
private void scaleByMemory() { | |
Admin admin = new AdminFactory().addGroup("elip-xap").createAdmin(); | |
// discover the space | |
space = admin.getProcessingUnits().waitFor("mySpace"); | |
// scale to 128MB of memery capacity. this means that number of container will be 128/memeoryCapacityPerContainer | |
space.scale(new ManualCapacityScaleConfigurer().memoryCapacity(128, MemoryUnit.MEGABYTES).create()); | |
This file contains 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
Admin admin = new AdminFactory().addGroup("elip-xap").createAdmin(); | |
GridServiceManager gsm = admin.getGridServiceManagers().waitForAtLeastOne(); | |
ElasticSpaceDeployment deployment = new ElasticSpaceDeployment("mySpace"); | |
// deploy a 4,1 cluster. | |
// this should be default use just 2 containers | |
deployment.memoryCapacityPerContainer(32, MemoryUnit.MEGABYTES); | |
deployment.maxMemoryCapacity(256, MemoryUnit.MEGABYTES); | |
deployment.minNumberOfCpuCoresPerMachine(1); |