Comments (5)
Hi @benliger1987 , you can use this way ~
const runner = new GitlabContainerRunner(this, 'GitlabContainerRunner', {
selfvpc: vpc,
gitlabtoken: '',
});
defaultSecurityGroup.addIngressRule(
ec2.Peer.securityGroupId(runner.defaultRunnerSG.securityGroupId),
ec2.Port.tcp(5432),
'Opening RDS to Lambda',
);
from cdk-gitlab-runner.
That didn't seem to do it unfortunately, I can see the above code has created an inbound rule:
However I am still not able to connect to the instance...
from cdk-gitlab-runner.
I don't know what is going on at your env.
But I can use this example code to create gitlab runner and connect to rds.
const vpc = new ec2.Vpc(this, 'VPC', {
cidr: '10.0.0.0/20',
natGateways: 1,
maxAzs: 2,
enableDnsHostnames: true,
enableDnsSupport: true,
subnetConfiguration: [
{
cidrMask: 22,
name: 'public',
subnetType: ec2.SubnetType.PUBLIC,
},
{
cidrMask: 22,
name: 'private',
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
},
],
});
// my sg
const defaultSecurityGroup = ec2.SecurityGroup.fromSecurityGroupId(
this,
'SG',
vpc.vpcDefaultSecurityGroup,
);
defaultSecurityGroup.addIngressRule(
ec2.Peer.securityGroupId(defaultSecurityGroup.securityGroupId),
ec2.Port.tcp(5432),
'Opening RDS to Lambda',
);
const runner = new GitlabContainerRunner(this, 'GitlabContainerRunner', {
selfvpc: vpc,
gitlabtoken: '',
vpcSubnet: {
subnetType: aws_ec2.SubnetType.PRIVATE_WITH_EGRESS,
},
});
defaultSecurityGroup.addIngressRule(
ec2.Peer.securityGroupId(runner.defaultRunnerSG.securityGroupId),
ec2.Port.tcp(5432),
'Opening RDS to Lambda',
);
new rds.DatabaseCluster(
this,
'Cluster',
{
engine: rds.DatabaseClusterEngine.AURORA_POSTGRESQL,
parameterGroup: rds.ParameterGroup.fromParameterGroupName(
this,
'ParameterGroup',
'default.aurora-postgresql13',
),
instanceProps: {
vpc,
vpcSubnets: vpc.selectSubnets({
subnetType: ec2.SubnetType.PUBLIC,
}),
instanceType: ec2.InstanceType.of(
ec2.InstanceClass.T3,
ec2.InstanceSize.MEDIUM,
),
securityGroups: [defaultSecurityGroup],
},
instances: 1,
storageEncrypted: true,
credentials: {
username: 'pgadmin',
password: SecretValue.unsafePlainText('123456wsxedc'),
},
},
);
from cdk-gitlab-runner.
Its strange, I have replicated your implementation in my code and can not get it to work
from cdk-gitlab-runner.
I think this is just a single case, so please allow me to close this issue.
from cdk-gitlab-runner.
Related Issues (20)
- feat(runner-configuration): Allow GitLab runner concurrent job configuration HOT 7
- Deployment does not create runner HOT 3
- feat: Launch Template support
- Unable to unregister ASG runners when cloudformation stack is destroyed
- Reporting a vulnerability HOT 1
- Multiple deprecation warnings HOT 2
- (feat): use public ecr replace docker io
- cloud-init failed on usermod to ssm-user HOT 1
- Add amazon-cloudwatch-agent on autoscaling runner
- Feature: Gitlab Token from Secrets Manager HOT 2
- a .gitlab-ci.yaml for runner setup HOT 2
- feat: Terminate runner instance when disk usage is high
- registration-token deprecation HOT 4
- Security Improvements
- No longer possible to use SSM to store gitlab token HOT 2
- (core): remove extra package and use best practice install docker on Amazon Linux2
- (core): let docker.sock binding not default binding, make it optional.
- (feat): Multiple GitLab CI tokens HOT 8
- Unable to deploy construct with spot fleet enabled HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cdk-gitlab-runner.