chilly-computer-67665
08/21/2020, 9:24 AMwonderful-window-14544
08/21/2020, 2:08 PMchilly-hairdresser-56259
08/21/2020, 3:45 PMbitter-dentist-28132
08/21/2020, 8:21 PMdamp-secretary-81951
08/21/2020, 8:24 PM--stack ${AWS::StackName} --region ${AWS::Region}
thankful-holiday-28161
08/21/2020, 8:59 PMloud-soccer-66701
08/22/2020, 3:57 PM[getLatestSemverDockerTag, updateKubernetesDeployment, notifySlackConsumers]
, [generateTagFromProjectHash, buildAnddeployDockerImage, redeployEC2Instances, ...]
the aim is - to maintain separate pieces of code dvided by components, toavoid duplication and so on, you know how it goes in software developers world
questions:
- does it make sense? is there a more preferrable way of building pipelines from composable pieces?
- how do you do it currently? any best practices?curved-kangaroo-20109
08/23/2020, 3:21 AMchilly-rainbow-79265
08/24/2020, 11:43 AMwonderful-window-14544
08/24/2020, 12:58 PMpulumi.Output<RunCommandResult>;
object filled but cannot and need some data to file but cannot grab values as strings. Need to write output to local file. Is there any way?best-lifeguard-91445
08/24/2020, 2:40 PMpulumi up
and completes successfully, my stack continues to show changes on the next invocation of`pulumi preview` and pulumi up
→ [feature/devops/baffle-ha-732 ≡ +0 ~10 -0 !]› pulumi up
Previewing update (dev):
Type Name Plan Info
pulumi:pulumi:Stack aws-dev 14 messages
├─ awsx:x:ecs:EC2TaskDefinition use1-dev-registrar-api
+- │ └─ aws:ecs:TaskDefinition use1-dev-registrar-api replace [diff: ~containerDefinitions]
└─ awsx:x:ecs:EC2Service use1-dev-registrar-api
~ └─ aws:ecs:Service use1-dev-registrar-api update [diff: ~taskDefinition]
Details:
++aws:ecs/taskDefinition:TaskDefinition: (create-replacement)
[id=use1-dev-registrar-api]
[urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
[provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
~ containerDefinitions: "[secret]" => "[secret]"
+-aws:ecs/taskDefinition:TaskDefinition: (replace)
[id=use1-dev-registrar-api]
[urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
[provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
~ containerDefinitions: "[secret]" => "[secret]"
~ aws:ecs/service:Service: (update)
[id=arn:aws:ecs:us-east-1:382762964374:service/use1-dev-registrar-api-6d44494]
[urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2Service$aws:ecs/service:Service::use1-dev-registrar-api]
[provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
~ taskDefinition: "arn:aws:ecs:us-east-1:382762964374:task-definition/use1-dev-registrar-api:226" => output<string>
--aws:ecs/taskDefinition:TaskDefinition: (delete-replaced)
[id=use1-dev-registrar-api]
[urn=urn:pulumi:dev::aws::awsx:x:ecs:EC2TaskDefinition$aws:ecs/taskDefinition:TaskDefinition::use1-dev-registrar-api]
[provider=urn:pulumi:dev::aws::pulumi:providers:aws::default_2_4_0::ef2f3133-efd2-4f21-a3ed-67550c0c8b97]
victorious-helmet-11068
08/24/2020, 3:27 PMvictorious-helmet-11068
08/24/2020, 3:28 PMvictorious-helmet-11068
08/24/2020, 3:28 PMvictorious-helmet-11068
08/24/2020, 3:28 PMvictorious-helmet-11068
08/24/2020, 3:28 PMchilly-rainbow-79265
08/24/2020, 6:19 PMtype Cassandra struct {
pulumi.ResourceState
}
func NewCassandra(ctx *pulumi.Context, name string, opts ...pulumi.ResourceOption) (*MyComponent, error) {
cassandra := &Cassandra{}
err := ctx.RegisterComponentResource("pkg:index:NewCassandra", name, cassandra, opts...)
if err != nil {
return nil, err
}
return cassandra, nil
}
Here is it possible to some how, I can add a method for
cassandra.Scale()
or more preferably, when I increase the node from 1-2 it'll get added to the cluster, that means, the state change event from the engine, should it be possible to do something there.
Main thing I want is the capability to plug the scale method with increase/decrease number of nodes.
ie, if I change the number of nod*es from 1 -> 2 it should trigger a scale up* op, and if 2-> 1 it should do scale down + destroy the vm.stocky-spoon-28903
08/24/2020, 6:23 PMfunc (c *Cassandra) AMethod(/* params */) error {
// ...
}
stocky-spoon-28903
08/24/2020, 6:24 PMNewCassandra
function to return *Cassandra
rather than *MyComponent
chilly-magazine-6129
08/24/2020, 6:24 PMdamp-secretary-81951
08/24/2020, 8:00 PMcd
into our git repo
3. Will pulumi up
work at that point? I can only find docs for initializing a new stack, not starting to use an existing onehundreds-musician-51496
08/24/2020, 8:38 PMup
on a stack and all its dependencies (i.e., all the stacks that it references as resources)?wet-noon-14291
08/24/2020, 9:22 PMfew-shoe-6011
08/24/2020, 9:44 PM[secret]
. Any idea?
I am using a secret from pulumi to populate a kubernetes secret that is eventually mounted as a volume on the deployment, but I don't understand why that would cause the name to be masked.
const envSecret = new kx.Secret(`${env}-api-secret`, {
stringData: {
...
GOOGLE_APPLICATION_CREDENTIALS: config.requireSecret('GOOGLE_APPLICATION_CREDENTIALS'),
}
});
...
export const deployment_name = deployment.metadata.name;
damp-secretary-81951
08/24/2020, 11:30 PMindex.js
, but my quick-demo
stack to use quick-demo.js
instead.nice-football-42636
08/25/2020, 10:50 AM.NET SDK
and I would like to know, if there is a way to access the current stack name (selected via pulumi cli
) before running the deployment. I found in the source code a property Deployment.Stack
but it throws an exception if I try to access it before running the deployment.
I need to do that in order to run deployment of 2 stacks in one azure dev ops pipeline through one project (we use monolithic approach to project/stacks structure). So I would like to access the currently selected stack and based on that run deployment of specific stack from code.
(I know I can access it via PULUMI_STACK
environment variable but I don't want to rely on some deep internal implementation details but rather use some top level api to access the stack name).straight-branch-26699
08/25/2020, 1:47 PMgifted-cat-21399
08/25/2020, 4:59 PMmany-psychiatrist-74327
08/25/2020, 9:15 PMunable to load Kubernetes client configuration from kubeconfig file
.
I see that in Crosswalk for AWS, the @pulumi/eks
(nodejs) package would let me export cluster.kubeconfig
(docs). But I don’t see anything similar for Python! And the Cluster Resource itself doesn’t seem to have any Output that has the necessary information to set my kubeconfig
or otherwise create a Provider to use in my Kubernetes resources. Please help!handsome-zebra-11018
08/26/2020, 2:45 AMcontainers: [
{
name: appServerLabel,
image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
volumeMounts: [
{
name: "volume-bigdisk",
mountPath: "/logs/"
}
],
}
],
volumes: [
{
name: "volume-bigdisk",
server: "servername*****",
path: "/af_appserver/VAF/bigdisk",
readOnly: false
}
]
I am getting below error
ame: string; server: string; path: string; readOnly: boolean; }[]; }' is not assignable to type 'PodSpec'.
Types of property 'volumes' are incompatible.
Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Input<Volume>[]>'.
Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Volume>[]'.
Type '{ name: string; server: string; path: string; readOnly: boolean; }' is not assignable to type 'Input<Volume>'.
Object literal may only specify known properties, and 'server' does not exist in type 'Input<Volume>'.
handsome-zebra-11018
08/26/2020, 2:45 AMcontainers: [
{
name: appServerLabel,
image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
volumeMounts: [
{
name: "volume-bigdisk",
mountPath: "/logs/"
}
],
}
],
volumes: [
{
name: "volume-bigdisk",
server: "servername*****",
path: "/af_appserver/VAF/bigdisk",
readOnly: false
}
]
I am getting below error
ame: string; server: string; path: string; readOnly: boolean; }[]; }' is not assignable to type 'PodSpec'.
Types of property 'volumes' are incompatible.
Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Input<Volume>[]>'.
Type '{ name: string; server: string; path: string; readOnly: boolean; }[]' is not assignable to type 'Input<Volume>[]'.
Type '{ name: string; server: string; path: string; readOnly: boolean; }' is not assignable to type 'Input<Volume>'.
Object literal may only specify known properties, and 'server' does not exist in type 'Input<Volume>'.
gorgeous-egg-16927
08/26/2020, 3:40 PMvolumes
doesn’t include the server
field, so that’s why the type checker is complaining.
https://www.pulumi.com/docs/reference/pkg/kubernetes/core/v1/pod/#volumepath
is also incorrectcontainers: [
{
name: appServerLabel,
image: config.get("docker_image") + ":" + config.get("docker_image_tag"),
ports: [{name: "http", containerPort: 80},{name: "https", containerPort: 443}],
volumeMounts: [
{
name: "volume-bigdisk",
mountPath: "/logs/"
}
],
}
],
volumes: [
{
name: "volume-bigdisk",
nfs: {
server: "servername*****",
path: "/af_appserver/VAF/bigdisk",
readOnly: false
}
}
]
handsome-zebra-11018
08/27/2020, 2:08 AM