cdk-code-server 0.0.13__py3-none-any.whl → 1.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cdk_code_server/__init__.py +46 -8
- cdk_code_server/_jsii/__init__.py +1 -1
- cdk_code_server/_jsii/cdk-code-server@1.0.1.jsii.tgz +0 -0
- {cdk_code_server-0.0.13.dist-info → cdk_code_server-1.0.1.dist-info}/METADATA +29 -14
- cdk_code_server-1.0.1.dist-info/RECORD +9 -0
- cdk_code_server/_jsii/cdk-code-server@0.0.13.jsii.tgz +0 -0
- cdk_code_server-0.0.13.dist-info/RECORD +0 -9
- {cdk_code_server-0.0.13.dist-info → cdk_code_server-1.0.1.dist-info}/LICENSE +0 -0
- {cdk_code_server-0.0.13.dist-info → cdk_code_server-1.0.1.dist-info}/WHEEL +0 -0
- {cdk_code_server-0.0.13.dist-info → cdk_code_server-1.0.1.dist-info}/top_level.txt +0 -0
cdk_code_server/__init__.py
CHANGED
@@ -65,17 +65,17 @@ new CodeServer(this, 'CodeServer', {
|
|
65
65
|
|
66
66
|
## Setup VSCode Server
|
67
67
|
|
68
|
-
After the stack is deployed, you can access
|
68
|
+
After the stack is deployed, you can access the server via AWS Systems Manager (SSM) Session Manager by default and start the VSCode server:
|
69
69
|
|
70
|
-
### Access to the EC2 instance
|
70
|
+
### Access to the EC2 instance (Default: SSM)
|
71
71
|
|
72
|
-
|
72
|
+
1. In the AWS Console, go to the EC2 Instances page and select your instance.
|
73
|
+
2. Click the "Connect" button, choose "Session Manager", and click "Connect".
|
74
|
+
3. Once connected, switch to the ec2-user account:
|
73
75
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-

|
76
|
+
```sh
|
77
|
+
sudo su --login ec2-user
|
78
|
+
```
|
79
79
|
|
80
80
|
### Start the VSCode server
|
81
81
|
|
@@ -117,6 +117,21 @@ At this point, the GitHub authentication screen may appear again, so press Autho
|
|
117
117
|
Once you open the terminal, you’re all set.
|
118
118
|
|
119
119
|

|
120
|
+
|
121
|
+
---
|
122
|
+
|
123
|
+
|
124
|
+
### (Option) Access via EC2 Instance Connect Endpoint (EIC Endpoint)
|
125
|
+
|
126
|
+
If the `useInstanceConnectEndpoint` option is set to true, you can connect via the EC2 Instance Connect Endpoint.
|
127
|
+
|
128
|
+
1. In the AWS Console, go to the EC2 Instances page and select your instance.
|
129
|
+
2. Click the "Connect" button, choose "EC2 Instance Connect", then select "Connect using EC2 Instance Connect Endpoint", and click "Connect".
|
130
|
+
3. Once connected, you will see a screen similar to the following:
|
131
|
+
|
132
|
+

|
133
|
+
|
134
|
+
1. Follow the same steps as in the SSM section to start the VSCode server and connect via tunnel.
|
120
135
|
'''
|
121
136
|
from pkgutil import extend_path
|
122
137
|
__path__ = extend_path(__path__, __name__)
|
@@ -170,6 +185,7 @@ class CodeServer(
|
|
170
185
|
cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
|
171
186
|
instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
|
172
187
|
policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
|
188
|
+
use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
|
173
189
|
user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
|
174
190
|
volume_size: typing.Optional[jsii.Number] = None,
|
175
191
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -180,6 +196,7 @@ class CodeServer(
|
|
180
196
|
:param cpu_type: The CPU type. Default: - ARM_64
|
181
197
|
:param instance_type: The instance type. Default: - C7g.2xlarge
|
182
198
|
:param policy: The IAM policy to attach to the instance role. Default: - Allow all actions on all resources
|
199
|
+
:param use_instance_connect_endpoint: Whether to use EC2 instance connect endpoint for instance access. If set to true, it will create an EC2 Instance Connect Endpoint in the VPC. You can access the instance using either EC2 Instance Connect or SSM Session Manager. Default: false - Uses only SSM Session Manager for instance access
|
183
200
|
:param user_data: User data to run when launching the instance. Default: - No additional user data
|
184
201
|
:param volume_size: The size of the root volume in GiB. Default: 30
|
185
202
|
:param vpc: The VPC where the instance will be deployed. Default: - A new VPC will be created
|
@@ -192,6 +209,7 @@ class CodeServer(
|
|
192
209
|
cpu_type=cpu_type,
|
193
210
|
instance_type=instance_type,
|
194
211
|
policy=policy,
|
212
|
+
use_instance_connect_endpoint=use_instance_connect_endpoint,
|
195
213
|
user_data=user_data,
|
196
214
|
volume_size=volume_size,
|
197
215
|
vpc=vpc,
|
@@ -207,6 +225,7 @@ class CodeServer(
|
|
207
225
|
"cpu_type": "cpuType",
|
208
226
|
"instance_type": "instanceType",
|
209
227
|
"policy": "policy",
|
228
|
+
"use_instance_connect_endpoint": "useInstanceConnectEndpoint",
|
210
229
|
"user_data": "userData",
|
211
230
|
"volume_size": "volumeSize",
|
212
231
|
"vpc": "vpc",
|
@@ -219,6 +238,7 @@ class CodeServerProps:
|
|
219
238
|
cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
|
220
239
|
instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
|
221
240
|
policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
|
241
|
+
use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
|
222
242
|
user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
|
223
243
|
volume_size: typing.Optional[jsii.Number] = None,
|
224
244
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -228,6 +248,7 @@ class CodeServerProps:
|
|
228
248
|
:param cpu_type: The CPU type. Default: - ARM_64
|
229
249
|
:param instance_type: The instance type. Default: - C7g.2xlarge
|
230
250
|
:param policy: The IAM policy to attach to the instance role. Default: - Allow all actions on all resources
|
251
|
+
:param use_instance_connect_endpoint: Whether to use EC2 instance connect endpoint for instance access. If set to true, it will create an EC2 Instance Connect Endpoint in the VPC. You can access the instance using either EC2 Instance Connect or SSM Session Manager. Default: false - Uses only SSM Session Manager for instance access
|
231
252
|
:param user_data: User data to run when launching the instance. Default: - No additional user data
|
232
253
|
:param volume_size: The size of the root volume in GiB. Default: 30
|
233
254
|
:param vpc: The VPC where the instance will be deployed. Default: - A new VPC will be created
|
@@ -237,6 +258,7 @@ class CodeServerProps:
|
|
237
258
|
check_type(argname="argument cpu_type", value=cpu_type, expected_type=type_hints["cpu_type"])
|
238
259
|
check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
|
239
260
|
check_type(argname="argument policy", value=policy, expected_type=type_hints["policy"])
|
261
|
+
check_type(argname="argument use_instance_connect_endpoint", value=use_instance_connect_endpoint, expected_type=type_hints["use_instance_connect_endpoint"])
|
240
262
|
check_type(argname="argument user_data", value=user_data, expected_type=type_hints["user_data"])
|
241
263
|
check_type(argname="argument volume_size", value=volume_size, expected_type=type_hints["volume_size"])
|
242
264
|
check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
|
@@ -247,6 +269,8 @@ class CodeServerProps:
|
|
247
269
|
self._values["instance_type"] = instance_type
|
248
270
|
if policy is not None:
|
249
271
|
self._values["policy"] = policy
|
272
|
+
if use_instance_connect_endpoint is not None:
|
273
|
+
self._values["use_instance_connect_endpoint"] = use_instance_connect_endpoint
|
250
274
|
if user_data is not None:
|
251
275
|
self._values["user_data"] = user_data
|
252
276
|
if volume_size is not None:
|
@@ -281,6 +305,18 @@ class CodeServerProps:
|
|
281
305
|
result = self._values.get("policy")
|
282
306
|
return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement], result)
|
283
307
|
|
308
|
+
@builtins.property
|
309
|
+
def use_instance_connect_endpoint(self) -> typing.Optional[builtins.bool]:
|
310
|
+
'''Whether to use EC2 instance connect endpoint for instance access.
|
311
|
+
|
312
|
+
If set to true, it will create an EC2 Instance Connect Endpoint in the VPC.
|
313
|
+
You can access the instance using either EC2 Instance Connect or SSM Session Manager.
|
314
|
+
|
315
|
+
:default: false - Uses only SSM Session Manager for instance access
|
316
|
+
'''
|
317
|
+
result = self._values.get("use_instance_connect_endpoint")
|
318
|
+
return typing.cast(typing.Optional[builtins.bool], result)
|
319
|
+
|
284
320
|
@builtins.property
|
285
321
|
def user_data(self) -> typing.Optional[typing.List[builtins.str]]:
|
286
322
|
'''User data to run when launching the instance.
|
@@ -334,6 +370,7 @@ def _typecheckingstub__a3dc073ef85aeeab8ffd2fe5c32c737ce76d0e4197f8d84ff2cfe4d4a
|
|
334
370
|
cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
|
335
371
|
instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
|
336
372
|
policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
|
373
|
+
use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
|
337
374
|
user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
|
338
375
|
volume_size: typing.Optional[jsii.Number] = None,
|
339
376
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -346,6 +383,7 @@ def _typecheckingstub__fb583e2cef71433ccfaa187bf48195bf7085ded509b20a2c01dc80cff
|
|
346
383
|
cpu_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.AmazonLinuxCpuType] = None,
|
347
384
|
instance_type: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.InstanceType] = None,
|
348
385
|
policy: typing.Optional[_aws_cdk_aws_iam_ceddda9d.PolicyStatement] = None,
|
386
|
+
use_instance_connect_endpoint: typing.Optional[builtins.bool] = None,
|
349
387
|
user_data: typing.Optional[typing.Sequence[builtins.str]] = None,
|
350
388
|
volume_size: typing.Optional[jsii.Number] = None,
|
351
389
|
vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
|
@@ -32,7 +32,7 @@ import aws_cdk._jsii
|
|
32
32
|
import constructs._jsii
|
33
33
|
|
34
34
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
35
|
-
"cdk-code-server", "
|
35
|
+
"cdk-code-server", "1.0.1", __name__[0:-6], "cdk-code-server@1.0.1.jsii.tgz"
|
36
36
|
)
|
37
37
|
|
38
38
|
__all__ = [
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cdk-code-server
|
3
|
-
Version:
|
3
|
+
Version: 1.0.1
|
4
4
|
Summary: CDK Construct for a VSCode Server development environment on EC2
|
5
5
|
Home-page: https://github.com/badmintoncryer/cdk-code-server.git
|
6
6
|
Author: Kazuho CryerShinozuka<malaysia.cryer@gmail.com>
|
@@ -19,11 +19,11 @@ Classifier: License :: OSI Approved
|
|
19
19
|
Requires-Python: ~=3.9
|
20
20
|
Description-Content-Type: text/markdown
|
21
21
|
License-File: LICENSE
|
22
|
-
Requires-Dist: aws-cdk-lib<3.0.0,>=2.143.0
|
23
|
-
Requires-Dist: constructs<11.0.0,>=10.0.5
|
24
|
-
Requires-Dist: jsii<2.0.0,>=1.
|
25
|
-
Requires-Dist: publication>=0.0.3
|
26
|
-
Requires-Dist: typeguard<4.3.0,>=2.13.3
|
22
|
+
Requires-Dist: aws-cdk-lib <3.0.0,>=2.143.0
|
23
|
+
Requires-Dist: constructs <11.0.0,>=10.0.5
|
24
|
+
Requires-Dist: jsii <2.0.0,>=1.113.0
|
25
|
+
Requires-Dist: publication >=0.0.3
|
26
|
+
Requires-Dist: typeguard <4.3.0,>=2.13.3
|
27
27
|
|
28
28
|
# CDK VSCode Server Construct
|
29
29
|
|
@@ -91,17 +91,17 @@ new CodeServer(this, 'CodeServer', {
|
|
91
91
|
|
92
92
|
## Setup VSCode Server
|
93
93
|
|
94
|
-
After the stack is deployed, you can access
|
94
|
+
After the stack is deployed, you can access the server via AWS Systems Manager (SSM) Session Manager by default and start the VSCode server:
|
95
95
|
|
96
|
-
### Access to the EC2 instance
|
96
|
+
### Access to the EC2 instance (Default: SSM)
|
97
97
|
|
98
|
-
|
98
|
+
1. In the AWS Console, go to the EC2 Instances page and select your instance.
|
99
|
+
2. Click the "Connect" button, choose "Session Manager", and click "Connect".
|
100
|
+
3. Once connected, switch to the ec2-user account:
|
99
101
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-

|
102
|
+
```sh
|
103
|
+
sudo su --login ec2-user
|
104
|
+
```
|
105
105
|
|
106
106
|
### Start the VSCode server
|
107
107
|
|
@@ -143,3 +143,18 @@ At this point, the GitHub authentication screen may appear again, so press Autho
|
|
143
143
|
Once you open the terminal, you’re all set.
|
144
144
|
|
145
145
|

|
146
|
+
|
147
|
+
---
|
148
|
+
|
149
|
+
|
150
|
+
### (Option) Access via EC2 Instance Connect Endpoint (EIC Endpoint)
|
151
|
+
|
152
|
+
If the `useInstanceConnectEndpoint` option is set to true, you can connect via the EC2 Instance Connect Endpoint.
|
153
|
+
|
154
|
+
1. In the AWS Console, go to the EC2 Instances page and select your instance.
|
155
|
+
2. Click the "Connect" button, choose "EC2 Instance Connect", then select "Connect using EC2 Instance Connect Endpoint", and click "Connect".
|
156
|
+
3. Once connected, you will see a screen similar to the following:
|
157
|
+
|
158
|
+

|
159
|
+
|
160
|
+
1. Follow the same steps as in the SSM section to start the VSCode server and connect via tunnel.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
cdk_code_server/__init__.py,sha256=ABcpjzx8Enzmgh6EfxIukSZq7D022-iuP6elrBXxkv4,17391
|
2
|
+
cdk_code_server/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
cdk_code_server/_jsii/__init__.py,sha256=K6NuWvUGymO9z1_6zmNYwqp5OFCJo0ztDj5ZW_ulkF0,1441
|
4
|
+
cdk_code_server/_jsii/cdk-code-server@1.0.1.jsii.tgz,sha256=y-C_v9K-8L21iq7Nx19HIeAOXQuX9JfaBHTZ-P-FpFc,1313065
|
5
|
+
cdk_code_server-1.0.1.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
6
|
+
cdk_code_server-1.0.1.dist-info/METADATA,sha256=59FFr363zATwsGWq3johkl4GSNmRfUIFCD38rmihXWc,6634
|
7
|
+
cdk_code_server-1.0.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
8
|
+
cdk_code_server-1.0.1.dist-info/top_level.txt,sha256=UPdb0hVf1P6GpgMW16KwUQ3sBADg2WccQHQeL85PrBU,16
|
9
|
+
cdk_code_server-1.0.1.dist-info/RECORD,,
|
Binary file
|
@@ -1,9 +0,0 @@
|
|
1
|
-
cdk_code_server/__init__.py,sha256=OgrsOboDe9XyeSklFj90EnH3cmK7s0urd7hRAzrdQjw,14816
|
2
|
-
cdk_code_server/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
-
cdk_code_server/_jsii/__init__.py,sha256=uur0aaf67C7jzT3xtMX9FQqzl56zEP2Sd7mGH5-RzEg,1443
|
4
|
-
cdk_code_server/_jsii/cdk-code-server@0.0.13.jsii.tgz,sha256=0_IoiOQWiI_H61LXOQhBkBbVQJuVRhrR_Nq3rCJdjVE,1311149
|
5
|
-
cdk_code_server-0.0.13.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
6
|
-
cdk_code_server-0.0.13.dist-info/METADATA,sha256=0tXd_fNn0TxUawCPNXvkxion62brE_dosyOaZ0FKClI,6080
|
7
|
-
cdk_code_server-0.0.13.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
8
|
-
cdk_code_server-0.0.13.dist-info/top_level.txt,sha256=UPdb0hVf1P6GpgMW16KwUQ3sBADg2WccQHQeL85PrBU,16
|
9
|
-
cdk_code_server-0.0.13.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|