[![NPM version](https://badge.fury.io/js/%40cdk-constructs-zone%2Fsuper-ec2.svg)](https://badge.fury.io/js/%40cdk-constructs-zone%2Fsuper-ec2)
[![PyPI version](https://badge.fury.io/py/super-ec2.svg)](https://badge.fury.io/py/super-ec2)
![Release](https://github.com/cdk-constructs-zone/super-ec2/workflows/release/badge.svg)
![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)
![npm](https://img.shields.io/npm/dt/@cdk-constructs-zone/super-ec2?label=npm&color=orange)
![PyPI](https://img.shields.io/pypi/dm/super-ec2?label=pypi&color=blue)
![](https://img.shields.io/badge/jenkins-ec2-green=?style=plastic&logo=appveyor)
# Welcome to `@cdk-constructs-zone/super-ec2`
This repository template helps you create EC2 .
## Sample
### Jenkins
* Simplest deployment: It would creat a VPC and ALB by default.
```python
import * as cdk from '@aws-cdk/core';
import { JenkinsEC2, ELBtype } from '@cdk-constructs-zone/super-ec2';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'demo');
const jks = new JenkinsEC2(stack, 'superJks', {});
new cdk.CfnOutput(stack, 'loadbalancerDNS', {
value: jks.loadbalancer.loadBalancerDnsName,
});
new cdk.CfnOutput(stack, 'connect-to-instance', {
value: `aws ssm start-session --target ${jks.instance.instanceId}`,
});
```
* Deploy Jenkins with self-defined VPC and NLB
```python
const jks = new JenkinsEC2(stack, 'superJks', {
vpc: Vpc.fromLookup(stack, 'defaultVPC', { isDefault: true }),
loadbalancerType: ELBtype.NLB,
});
```
* Deploy Jenkins with R53 records: If `acm` is not given, it would create a certificate validated from DNS by default.
```python
const jks = new JenkinsEC2(stack, 'superJks', {
vpc: Vpc.fromLookup(stack, 'defaultVPC', { isDefault: true }),
loadbalancerType: ELBtype.NLB,
domain: {
acm: Certificate.fromCertificateArn(stack, 'cert',
'arn:aws:xxx',
),
hostedZoneId: 'xxx',
zoneName: 'bbb.ccc',
recordName: 'aaa',
},
});
```
Note: Jenkins initial admin password has been written to `/home/ec2-user/jenkins-data/secrets/initialAdminPassword`. You can access EC2 instance using [ssm tool](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html).
```
aws ssm start-session --target instance-id
```
Raw data
{
"_id": null,
"home_page": "https://github.com/cdk-constructs-zone/super-ec2.git",
"name": "super-ec2",
"maintainer": "",
"docs_url": null,
"requires_python": "~=3.7",
"maintainer_email": "",
"keywords": "",
"author": "@cdk-constructs-zone",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/ab/3a/e4b466fb291598069e0ff04e38c502737a81a0419218a22e485cdb91bade/super-ec2-0.0.420.tar.gz",
"platform": null,
"description": "[![NPM version](https://badge.fury.io/js/%40cdk-constructs-zone%2Fsuper-ec2.svg)](https://badge.fury.io/js/%40cdk-constructs-zone%2Fsuper-ec2)\n[![PyPI version](https://badge.fury.io/py/super-ec2.svg)](https://badge.fury.io/py/super-ec2)\n![Release](https://github.com/cdk-constructs-zone/super-ec2/workflows/release/badge.svg)\n\n![Downloads](https://img.shields.io/badge/-DOWNLOADS:-brightgreen?color=gray)\n![npm](https://img.shields.io/npm/dt/@cdk-constructs-zone/super-ec2?label=npm&color=orange)\n![PyPI](https://img.shields.io/pypi/dm/super-ec2?label=pypi&color=blue)\n\n![](https://img.shields.io/badge/jenkins-ec2-green=?style=plastic&logo=appveyor)\n\n# Welcome to `@cdk-constructs-zone/super-ec2`\n\nThis repository template helps you create EC2 .\n\n## Sample\n\n### Jenkins\n\n* Simplest deployment: It would creat a VPC and ALB by default.\n\n```python\nimport * as cdk from '@aws-cdk/core';\nimport { JenkinsEC2, ELBtype } from '@cdk-constructs-zone/super-ec2';\n\nconst app = new cdk.App();\n\nconst stack = new cdk.Stack(app, 'demo');\n\nconst jks = new JenkinsEC2(stack, 'superJks', {});\n\nnew cdk.CfnOutput(stack, 'loadbalancerDNS', {\n value: jks.loadbalancer.loadBalancerDnsName,\n});\nnew cdk.CfnOutput(stack, 'connect-to-instance', {\n value: `aws ssm start-session --target ${jks.instance.instanceId}`,\n});\n```\n\n* Deploy Jenkins with self-defined VPC and NLB\n\n```python\nconst jks = new JenkinsEC2(stack, 'superJks', {\n vpc: Vpc.fromLookup(stack, 'defaultVPC', { isDefault: true }),\n loadbalancerType: ELBtype.NLB,\n});\n```\n\n* Deploy Jenkins with R53 records: If `acm` is not given, it would create a certificate validated from DNS by default.\n\n```python\nconst jks = new JenkinsEC2(stack, 'superJks', {\n vpc: Vpc.fromLookup(stack, 'defaultVPC', { isDefault: true }),\n loadbalancerType: ELBtype.NLB,\n domain: {\n acm: Certificate.fromCertificateArn(stack, 'cert',\n 'arn:aws:xxx',\n ),\n hostedZoneId: 'xxx',\n zoneName: 'bbb.ccc',\n recordName: 'aaa',\n },\n});\n```\n\nNote: Jenkins initial admin password has been written to `/home/ec2-user/jenkins-data/secrets/initialAdminPassword`. You can access EC2 instance using [ssm tool](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html).\n\n```\naws ssm start-session --target instance-id\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A construct lib for AWS CDK EC2",
"version": "0.0.420",
"project_urls": {
"Homepage": "https://github.com/cdk-constructs-zone/super-ec2.git",
"Source": "https://github.com/cdk-constructs-zone/super-ec2.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c778b3aa2734fe98098ca738c93846cb216ad510ac8deda1c702ed27451e484",
"md5": "e32126b5f24da566688b254c7c8b85c2",
"sha256": "b3d6eeb6da79f7db8c1d64852ed97dee9fe4bcb0f7d88fadcbab8080e43919b7"
},
"downloads": -1,
"filename": "super_ec2-0.0.420-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e32126b5f24da566688b254c7c8b85c2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.7",
"size": 4511857,
"upload_time": "2023-09-25T00:54:22",
"upload_time_iso_8601": "2023-09-25T00:54:22.863911Z",
"url": "https://files.pythonhosted.org/packages/6c/77/8b3aa2734fe98098ca738c93846cb216ad510ac8deda1c702ed27451e484/super_ec2-0.0.420-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ab3ae4b466fb291598069e0ff04e38c502737a81a0419218a22e485cdb91bade",
"md5": "83f1d8da5997200bcd0b56065431f02e",
"sha256": "1767ef642f927517ca72fadea2aac4dad475311f94ec6205b1bccb3a501d76f7"
},
"downloads": -1,
"filename": "super-ec2-0.0.420.tar.gz",
"has_sig": false,
"md5_digest": "83f1d8da5997200bcd0b56065431f02e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.7",
"size": 4513927,
"upload_time": "2023-09-25T00:54:25",
"upload_time_iso_8601": "2023-09-25T00:54:25.909514Z",
"url": "https://files.pythonhosted.org/packages/ab/3a/e4b466fb291598069e0ff04e38c502737a81a0419218a22e485cdb91bade/super-ec2-0.0.420.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-25 00:54:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cdk-constructs-zone",
"github_project": "super-ec2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "super-ec2"
}