Skip to content

Instantly share code, notes, and snippets.

@iliapolo
iliapolo / github-percona-percona-xtradb-cluster-operator-v1.12.0.yaml
Created June 25, 2023 16:30
github:percona/percona-xtradb-cluster-operator@1.12.0
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-container-day-web-c8024530
spec:
minReadySeconds: 0
progressDeadlineSeconds: 600
replicas: 2
selector:
matchLabels:
apiVersion: apps/v1
kind: Deployment
metadata:
name: aws-container-day-web-c8024530
spec:
minReadySeconds: 0
progressDeadlineSeconds: 600
replicas: 2
selector:
matchLabels:
@iliapolo
iliapolo / ecr.md
Last active May 30, 2021 16:57
Construct-Hub: Package page documentation example for `@aws-cdk/aws-ecr`

Amazon ECR Construct Library


cfn-resources: Stable

cdk-constructs: Stable


@iliapolo
iliapolo / ElasticSpaceRebalancing.java
Created May 5, 2015 09:25
Rebalancing an elastic space
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);
@iliapolo
iliapolo / ElasticSapceScale.java
Created May 2, 2015 13:01
Scaling example of an ElasticSpace (Elastic Service Manager - Gigaspaces)
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());
@iliapolo
iliapolo / ElasticSpaceDeployment.Java
Created May 2, 2015 12:52
Deployment example for an ElasticSpace (Elastic Service Manager - GigaSpaces)
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);