
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@genie-solutions/gdk
Advanced tools
Set of reusable constructs for deploying AWS resources to Gentu and Platform.
Installing this library into your project
$ npm i @genie-solutions/gdk
Major version 1.0.0 is built using version 2.0.0 of the AWS CDK. If you are using this library fresh, please use version 1.0.0 of the library and version 2.0.0+ of the AWS CDK. Legacy instructions remain below for supporting version 0.40.0.
This library is built using using version 1.151.0 of the AWS CDK. To ensure that you are able to use cdk and this library, please pin your cdk version.
$ npm i -g aws-cdk@1.151.0
Again also if you are using native CDK packages in your project, please ensure that you are using the same version. Example: S3 package...
$ npm install @aws-cdk/aws-s3@1.151.0
The GDK Library is organized into several modules but are packaged up into a single asset. The structure of the project is as follows:
Modules contain the following types:
The tests for the library should follow the same structure as the src folder.
After your branch has been merged into master:
git tag -a v<major>.<minor>.<patch> -m "<major>.<minor>.<patch>"
-- eg. git tag -a v0.31.14 -m "0.31.14"
(comment here is very important)git push --tags origin master
Gitlab pipeline will publish new version.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsThese variables are used to namespace all resources, generate stack names, tags and to ensure that the correct base infrastructure is targeted. They form the base of a GenieStack type.
❗ Required variables include:
- executionEnvironment
- featureEnvironment
- application
- service
- version
You can read more about environment strategy on the wiki.
This example creates an empty stack in which to build upon.
// The GDK includes a util module that allows developers to map environment variables to variables
export const configFromEnv =
fromEnv({
executionEnvironment: "EXECUTION_ENVIRONMENT",
featureEnvironment: "FEATURE_ENVIRONMENT",
application: "APPLICATION",
service: "SERVICE",
version: "VERSION",
containerImage: "CONTAINER_IMAGE"
});
// The service stack where everything is created
export class MyWebServiceStack extends GenieStack {
constructor(scope: Construct, id: string, props: BaseServiceStackProps) {
super(props, scope, id);
}
}
const app = new App();
// Service stack is instantiated with the properties pulled from environment variables
new MyWebServiceStack(app, "MyWebServiceStack", {
...configFromEnv
});
app.synth();
Building upon Example 1, this code contains a number of constructs in use, GenieFargateTaskDefinition and GenieFargateService. You will notice that props is passed around to each construct. This variable contains the minimum required variables as mentioned in Prerequisites, which again helps namespace, tag and target the correct infrastructure.
export class MyWebServiceStack extends GenieStack {
constructor(scope: Construct, id: string, props: BaseServiceStackProps) {
super(props, scope, id);
const myWebServiceTaskDef = new GenieFargateTaskDefinition(this, "EcsTaskDefinition", {
...props,
memoryLimitMiB: 1024,
cpu: 512,
});
myWebServiceTaskDef.addGenieContainer("MyWebContainer", {
imageName: configFromEnv.containerImage,
port: 8086,
cpu: 512,
memoryLimitMiB: 1024,
environment: {
"THIRD_PARTY_API_URL": "http://www.somethirdparty.com/api/v2"
},
...props
});
new GenieFargateService(this, "EcsService", {
...props,
taskDefinition: myWebServiceTaskDef,
desiredCount: 2,
isPublic: true,
healthCheck: {
path: "/health",
port: "8086"
}
});
}
}
FAQs
Common AWS CDK constructs for Genie
The npm package @genie-solutions/gdk receives a total of 0 weekly downloads. As such, @genie-solutions/gdk popularity was classified as not popular.
We found that @genie-solutions/gdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.