Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@winglibs/containers
Advanced tools
This library allows deploying arbitrary containers with Wing.
Use npm
to install this library:
npm i @winglibs/containers
The containers.Workload
resource represents a containerized workload.
bring containers;
new containers.Workload(
name: "hello",
image: "paulbouwer/hello-kubernetes:1",
port: 8080,
readiness: "/",
replicas: 4,
env: {
"MESSAGE" => message,
}
);
sim
When executed in the Wing Simulator, the workload is started within a local Docker container.
tf-aws
To deploy containerized workloads on AWS, we will need an EKS cluster. Unless other specified, a cluster will be automatically provisioned for each Wing application.
However, it a common practice to reuse a single EKS cluster for multiple applications. To reference an existing cluster, you will need to specify the following platform values:
eks.cluster_name
: The name of the clustereks.endpoint
: The URL of the Kubernetes API endpoint of the clustereks.certificate
: The certificate authority of this cluster.This information can be obtained from the AWS Console or through the script eks-values.sh
:
$ ./eks-values.sh CLUSTER-NAME > values.yaml
$ wing compile -t tf-aws --values ./values.yaml main.w
To create a new EKS cluster, you can use the tfaws.Cluster
resource:
eks.main.w
:
bring containers;
new containers.tfaws.Cluster() as "my-wing-cluster";
And provision it using Terraform:
wing compile -t tf-aws eks.main.w
cd target/eks.main.tfaws
terraform init
terraform apply
./eks-values.sh my-wing-cluster > values.yaml
This might take a up to 20 minutes to provision (now you see why we want to share it across apps?).
The last command will populate values.yaml
with the the cluster information needed to deploy
workloads.
To connect to this cluster using kubectl
, use:
aws eks update-kubeconfig --name my-wing-cluster
Then:
$ kubectl get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 36m
See Captain's Log in the Wing Slack.
cloud.Redis
databasecloud.Service
using containers.internalUrl()
in the simulator/aws.publicUrl()
in simulator/aws.tf-aws
(Disabled logging because aws-logging configmap was not found. configmap "aws-logging" not found
).sim
.start()
and stop()
../eks-value.sh
as part of this library?Licensed under the MIT License.
FAQs
Container support for Wing
The npm package @winglibs/containers receives a total of 480 weekly downloads. As such, @winglibs/containers popularity was classified as not popular.
We found that @winglibs/containers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.