average-dream-51210
05/30/2019, 12:38 AMpulumi up
to recreate the infra?delightful-city-79989
05/30/2019, 4:44 AMError: Cannot find module './about.js'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at app.get (/var/task/__index.js:9:22)
at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
at next (/var/task/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/var/task/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/var/task/node_modules/express/lib/router/layer.js:95:5)
at /var/task/node_modules/express/lib/router/index.js:281:22
When I try to serve a js file using:
const server = new cloud.HttpServer("myexpress", () => {
const app = express();
app.get("/", (req, res) => {
const page = require("./about.js");
page.render(req, res);
});
return app;
});
full-dress-10026
05/30/2019, 2:57 PMaws.cloudformation.Stack
from an existing stack? I see the method aws.cloudformation.getStack
but that returns a GetStackResult
. I see aws.cloudformation.Stack.get
but that takes an id
- not sure what to pass for that.jolly-egg-4894
05/30/2019, 2:59 PMGetStackResult
has an id
property, maybe use the id
from that into aws.cloudformation.Stack.get
🤷
https://pulumi.io/reference/pkg/nodejs/pulumi/aws/cloudformation/#GetStackResultjolly-egg-4894
05/30/2019, 3:00 PMfull-dress-10026
05/30/2019, 3:02 PMaws.cloudformation.Stack.get
and create new ones. Is there a way to see why Pulumi wants to do that?worried-engineer-33884
05/30/2019, 3:50 PMexport class BucketPolicy extends aws.s3.BucketPolicy {
constructor(name: string, bucket: aws.s3.Bucket) {
const bucketPolicyArgs = {
bucket: bucket.id,
policy: "",
}
super(name, bucketPolicyArgs);
}
}
and in my test i have
describe("BucketPolicy", function() {
describe("constructor", function() {
let testBucket = new infra.Bucket("test");
let bucketPolicy = new infra.BucketPolicy("test", testBucket);
it("should attach to the given bucket", function(done) {
bucketPolicy.bucket.apply(bucketId => { // this hangs
if (bucketId == "test") {
done()
} else {
done(new Error(`wrong bucket id ${bucketId}`))
}
})
});
the test hangs when it tries to retrieve the bucket output from bucketPolicyboundless-monkey-50243
05/30/2019, 4:06 PMterraform_remote_state
data source in Terraform? https://www.terraform.io/docs/providers/terraform/d/remote_state.html
(He asked, totally wanting to start using Pulumi piecemeal at the new gig.)stocky-spoon-28903
05/30/2019, 4:20 PMstocky-spoon-28903
05/30/2019, 4:21 PMnpm install "@pulumi/terraform"
stocky-spoon-28903
05/30/2019, 4:21 PMimport * as terraform from "@pulumi/terraform";
const remoteState = new terraform.state.RemoteStateReference("something", {
type = "terraform backend name"
// config here
});
stocky-spoon-28903
05/30/2019, 4:21 PMremoteState.outputs.getOutput(x)
stocky-spoon-28903
05/30/2019, 4:22 PMboundless-monkey-50243
05/30/2019, 4:24 PMboundless-monkey-50243
05/30/2019, 4:24 PMfull-dress-10026
05/30/2019, 5:40 PMsrc
directory in my Pulumi project, how would I do that? I tried just moving them all into a src
dir and adding this to my `tsconfig.json`:
"files": [
"src/index.ts"
]
When running pulumi up
, I get:
We failed to locate the entry point for your program: /home/kenny/compute_software/infrastructure/pulumi-k8s-src
Here's what we think went wrong:
* Your program's 'main' file (/home/kenny/compute_software/infrastructure/pulumi-k8s-src/index.js) does not exist.
stocky-spoon-28903
05/30/2019, 5:42 PM"main": "src/index.ts"
in your package.json IIRCfull-dress-10026
05/30/2019, 6:04 PMawsx.ecs.Cluster
into an EC2 based ECS cluster?full-dress-10026
05/30/2019, 6:54 PMpulumi.all
?damp-book-35965
05/30/2019, 9:26 PMpulumi export/import stack
or pulumi destroy
.. nothing What should I be doing in this case ?full-dress-10026
05/30/2019, 10:41 PMprovider
do I pass to a k8s.apps.v1.Deployment
when using Minikube?handsome-actor-1155
05/30/2019, 10:55 PMst1
. It seems that both a gp2
AND my st1
storageClasses get created and they are both marked as default
. Is this expected behavior? Is there a specific property I need to set to prevent that from happening?
// Create a VPC for our cluster.
const vpc = new awsx.ec2.Vpc("Kafka-VPC", {numberOfAvailabilityZones: 3});
// Create an EKS cluster with the given configuration.
const cluster = new eks.Cluster("kafka-cluster", {
vpcId: vpc.id,
subnetIds: vpc.privateSubnetIds,
instanceType: instanceType,
desiredCapacity: desiredCapacity,
minSize: minSize,
maxSize: maxSize,
storageClasses: storageClass,
deployDashboard: deployDashboard,
});
incalculable-diamond-5088
05/30/2019, 10:56 PMkiam
helm chart, it seems that the TLS certificates are not generated. I checked helm template .
and it generates them. Does pulumi has its own helm implementation?full-dress-10026
05/31/2019, 2:27 AMdeployDashboard: true
on my eks.Cluster
, how would I connect to the dashboard?full-dress-10026
05/31/2019, 2:51 AMnew aws.iam.RolePolicyAttachment("eks-node-role-assignment", {
policyArn: nodePolicy.arn,
role: eksCluster.instanceRole
})
This is throwing an exception:
Running program '/home/kenny/compute_software/infrastructure/pulumi-k8s-src' failed with an unhandled exception:
Error: Missing required property 'role'
Any idea why? Do I need to explicitly pass the role when creating the EKS cluster?thankful-island-60540
05/31/2019, 9:56 AMhelm upgrade ...
its all running fine,
When using next code example
jenkins_values = "PATH_TO_VALUES.yaml"
with open(jenkins_values) as f:
jenkins_values = f.read()
jenkins_values = yaml.load(jenkins_values)
Chart("jenkins",
ChartOpts(chart="jenkins",
repo="stable",
version="1.1.23",
namespace="jenkins",
values=jenkins_values))
The chart is being deployed, but not taking any of the values (it just deploys the default chart values).
Does Pulumi support of injecting a values file, or should i actually pass exact values i want to change (equivalent to --set)?incalculable-diamond-5088
05/31/2019, 5:51 PMfull-dress-10026
05/31/2019, 6:54 PMerror: unable to recognize "/tmp/tmp-6861Tmql3TRQ88g0.tmp": Get <https://2B657DC438F30EA7CB5A8D2297BABFA3.sk1.us-west-2.eks.amazonaws.com/api?timeout=32s>: dial tcp 52.36.238.179:443: i/o timeout
error: update failed
pulumi-nodejs:dynamic:Resource (k8s-cluster-dev-vpc-cni):
error: Plan apply failed: Command failed: kubectl apply -f /tmp/tmp-6861Tmql3TRQ88g0.tmp
error: unable to recognize "/tmp/tmp-6861Tmql3TRQ88g0.tmp": Get <https://2B657DC438F30EA7CB5A8D2297BABFA3.sk1.us-west-2.eks.amazonaws.com/api?timeout=32s>: dial tcp 52.36.238.179:443: i/o timeout
kubernetes:core:ConfigMap (k8s-cluster-dev-nodeAccess):
error: Plan apply failed: Get <https://2B657DC438F30EA7CB5A8D2297BABFA3.sk1.us-west-2.eks.amazonaws.com/api?timeout=32s>: dial tcp 52.89.83.215:443: i/o timeout
Here's what I did:
const eksRole1 = iam.createRole(`eks-role`);
const eksInstanceProfile = new aws.iam.InstanceProfile("eks-instance-profile", {role: eksRole1});
const nodePolicy = new aws.iam.Policy("eks-node-policy", {
namePrefix: `eks-node-${env}-`,
policy: JSON.stringify({
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"kms:Decrypt",
"pricing:*"
],
"Resource": "*"
}]
})
});
new aws.iam.RolePolicyAttachment("eks-node-role-assignment", {
policyArn: nodePolicy.arn,
role: eksRole1
});
eksCluster = new eks.Cluster(`k8s-cluster-${env}`, {
vpcId: vpc.id,
subnetIds: vpc.publicSubnetIds,
deployDashboard: false,
skipDefaultNodeGroup: true,
instanceRoles: [eksRole1]
});
eksCluster.createNodeGroup(`k8s-${env}-ng`, {
instanceType: "t2.medium",
desiredCapacity: 2,
minSize: 1,
maxSize: 2,
instanceProfile: eksInstanceProfile,
});
Guessing the example code is missing something necessary.brave-angle-33257
05/31/2019, 7:40 PMaws:region
?stocky-spoon-28903
05/31/2019, 7:51 PMnew aws.Provider(.....)
you can set it directly