0.0.40 โ€ข Published 5 months ago

@mavogel/cdk-vscode-server v0.0.40

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
5 months ago

Source Build Status ESLint Code Formatting Latest release GitHub npm typescript

cdk-vscode-server

Running your dev IDE vscode on AWS for development and workshop purposes.

!Note This construct is designed for workshop purposes and does not fulfill all security and authentication best practices.

EXPERIMENTALThis is an early version of the package. The API will change while I we implement new features. Therefore make sure you use an exact version in your package.json before it reaches 1.0.0.

Table of Contents

Features

  • โšก Quick Setup: Spin up and configure your vscode server in under 10 minutes in your AWS account
  • ๐Ÿ“ Best Practice Setup: Set up with projen and a single configuration file to keep your changes centralized.
  • ๐Ÿคนโ€โ™‚๏ธ Pre-installed packages: Besides the vscode server, other tools and software packages such as git, docker, awscli nodejs and python are pre-installed on the EC2 instance.
  • ๐Ÿ—๏ธ Extensibility: Pass in properties to the construct, which start with additional*. They allow you to extend the configuration to your needs. There are more to come...

Usage

The following steps get you started:

  1. Create a new awscdk-app via
npx projen new awscdk-app-ts --package-manager=npm
  1. Add @mavogel/cdk-vscode-server as a dependency to your project in the .projenrc.ts file
  2. Run npx projen to install it
  3. Add the following to the src/main.ts file:
import { App, Stack, StackProps } from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as iam from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
import { 
  LinuxArchitectureType, 
  LinuxFlavorType, 
  VSCodeServer
} from '@mavogel/cdk-vscode-server';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps = {}) {
    super(scope, id, props);

    new VSCodeServer(this, 'vscode', {
      // for example (or simply use the defaults by not setting the properties)
      instanceVolumeSize: 8,
      instanceClass: ec2.InstanceClass.M7G,
      instanceSize: ec2.InstanceSize.LARGE,
      instanceOperatingSystem: LinuxFlavorType.UBUNTU_22,
      instanceCpuArchitecture: LinuxArchitectureType.ARM,
      
      // ๐Ÿ‘‡๐Ÿฝ or if you want to give the InstanceRole more permissions
      additionalInstanceRolePolicies: [
        new iam.PolicyStatement({
          effect: iam.Effect.ALLOW,
          actions: [
            'codebuild:*',
          ],
          resources: [
            `arn:aws:codebuild:*:${Stack.of(this).account}:*/*`,
          ],
        }),
      ]
      
      // and more... ๐Ÿ’ก
    });
  }
}

const env = {
  account: '123456789912',
  region: 'eu-central-1',
};

const app = new App();
new MyStack(app, 'vscode-server', { env });
app.synth();

and deploy it

npx projen build
npx projen deploy

with the output

โœจ  Deployment time: 509.87s

Outputs:
dev.vscodedomainName6729AA39 = https://d1foo65bar4baz.cloudfront.net/?folder=/Workshop
dev.vscodepassword64FBCA12 = foobarbaz

See the examples folder for more inspiration.

  1. Then open the domain name in your favorite browser and you'd see the following login screen: vscode-server-ui-login

  2. After entering the password, you are logged into VSCode and can start coding :tada:

vscode-server-ui

!Important There are issues with copy pasting into the VSCode terminal within the Firefox browser (2025-01-12)

Solution Design

vscode-server-solution-design

Inspiration

This project was created based on the following inspiration

๐Ÿš€ Unlock the Full Potential of Your AWS Cloud Infrastructure

Hi, Iโ€™m Manuel, an AWS expert passionate about empowering businesses with scalable, resilient, and cost-optimized cloud solutions. With MV Consulting, I specialize in crafting tailored AWS architectures and DevOps-driven workflows that not only meet your current needs but grow with you.


๐ŸŒŸ Why Work With Me?

โœ”๏ธ Tailored AWS Solutions: Every business is unique, so I design custom solutions that fit your goals and challenges.
โœ”๏ธ Well-Architected Designs: From scalability to security, my solutions align with AWS Well-Architected Framework.
โœ”๏ธ Cloud-Native Focus: I specialize in modern, cloud-native systems that embrace the full potential of AWS.
โœ”๏ธ Business-Driven Tech: Technology should serve your business, not the other way around.


๐Ÿ›  What I Bring to the Table

๐Ÿ”‘ 12x AWS Certifications
Iโ€™m AWS Certified Solutions Architect and DevOps โ€“ Professional and hold numerous additional certifications, so you can trust Iโ€™ll bring industry best practices to your projects. Feel free to explose by badges

โš™๏ธ Infrastructure as Code (IaC)
With deep expertise in AWS CDK and Terraform, I ensure your infrastructure is automated, maintainable, and scalable.

๐Ÿ“ฆ DevOps Expertise
From CI/CD pipelines with GitHub Actions and GitLab CI to container orchestration Kubernetes and others, I deliver workflows that are smooth and efficient.

๐ŸŒ Hands-On Experience
With over 7 years of AWS experience and a decade in the tech world, Iโ€™ve delivered solutions for companies large and small. My open-source contributions showcase my commitment to transparency and innovation. Feel free to explore my GitHub profile


๐Ÿ’ผ Letโ€™s Build Something Great Together

I know that choosing the right partner is critical to your success. When you work with me, youโ€™re not just contracting an engineer โ€“ youโ€™re gaining a trusted advisor and hands-on expert who cares about your business as much as you do.

โœ”๏ธ Direct Collaboration: No middlemen or red tape โ€“ you work with me directly.
โœ”๏ธ Transparent Process: Expect open communication, clear timelines, and visible results.
โœ”๏ธ Real Value: My solutions focus on delivering measurable impact for your business.


๐Ÿ™Œ Acknowledgements

Big shoutout to the amazing team behind Projen!
Their groundbreaking work simplifies cloud infrastructure projects and inspires us every day. ๐Ÿ’ก

Author

Manuel Vogel

npm.io npm.io

0.0.40

5 months ago

0.0.39

5 months ago

0.0.38

5 months ago

0.0.37

5 months ago

0.0.36

6 months ago

0.0.35

6 months ago

0.0.34

6 months ago

0.0.33

6 months ago

0.0.32

6 months ago

0.0.31

7 months ago

0.0.30

7 months ago

0.0.29

7 months ago

0.0.28

7 months ago

0.0.27

8 months ago

0.0.26

8 months ago

0.0.25

8 months ago

0.0.24

8 months ago

0.0.23

9 months ago

0.0.22

9 months ago

0.0.21

9 months ago

0.0.20

9 months ago

0.0.19

9 months ago

0.0.18

9 months ago

0.0.17

9 months ago

0.0.16

9 months ago

0.0.15

9 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

9 months ago

0.0.11

9 months ago

0.0.10

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago