bitter-application-91815
03/23/2021, 6:53 PMbitter-application-91815
03/23/2021, 6:53 PMgreen-musician-49057
03/23/2021, 7:18 PMwhite-balloon-205
03/23/2021, 8:24 PMstrong-fall-61174
03/23/2021, 10:02 PMaverage-businessperson-33238
03/24/2021, 6:22 AMlimited-rainbow-51650
03/24/2021, 9:30 AMPromise leak detected
. I have my subclass of ComponentResource for a certain k8s abstraction, containing 2 resources. I pass the args
unchanged to the second resource. As a bug in my code, I forgot to pass args.metadata
to the first of my contained resources, mainly to have the correct k8s namespace for this resource as well. But after passing the metadata, I get the Promise leak detected
. Below is a summary of my component:
export class Service extends pulumi.ComponentResource {
constructor(name: string, args: kubernetes.core.v1.ServiceArgs, opts?: pulumi.ComponentResourceOptions) {
super("ng:kubernetes:core:Service", name, {}, opts);
this.backendcfg = new backendconfig.cloud.v1.BackendConfig(
`${name}-backendconfig`,
{
metadata: args.metadata,
...
},
{
parent: this,
}
)
this.service = new kubernetes.core.v1.Service(
name,
args,
...
);
}
adorable-musician-67025
03/24/2021, 10:12 AMprehistoric-kite-30979
03/24/2021, 12:07 PMbumpy-agent-19616
03/24/2021, 3:04 PMicy-dress-83371
03/24/2021, 3:31 PMpulumi login --local
. These two projects are in different folders, with different yaml files. Each had their own stack created, but when I say pulumi stack ls
in one of the projects folders, I seem to get both stacks accross multiple projects. I noticed this only because I tried to name the stack in both projects "dev". Am I doing something wrong here, or is this a byproduct of using local login or something?clever-plumber-29709
03/24/2021, 4:26 PMfew-tent-80031
03/24/2021, 4:58 PMfew-tent-80031
03/24/2021, 4:59 PMfew-tent-80031
03/24/2021, 4:59 PMorange-secretary-87364
03/24/2021, 6:46 PMpulumi stack ls
unless PULUMI_CONFIG_PASSPHRASE
is set, I'm using the s3 backend and the passphrase secrets provider. Output of pulumi --logtostderr -v5 stack ls
below:
I0324 18:37:18.745036 38931 backend.go:859] error reading stack: staging (decrypting secret value: failed to decrypt: incorrect passphrase, please set PULUMI_CONFIG_PASSPHRASE to the correct passphrase) skipping
NAME LAST UPDATE RESOURCE COUNT
management* 3 weeks ago 32
Does anyone have any ideas? I can't pulumi up
right now because there's a reference to the staging stack and the passphrase is different 😅worried-knife-31967
03/24/2021, 7:08 PMtall-shoe-66375
03/24/2021, 7:33 PMerror: gcp:container/cluster:Cluster resource 'cluster_infratotal' has a problem: Computed attribute cannot be set
brave-planet-10645
03/25/2021, 9:51 AMsteep-beard-51215
03/25/2021, 10:27 AM# Source: traefik/templates/service.yaml
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: Service
metadata:
name: traefik
labels:
<http://app.kubernetes.io/name|app.kubernetes.io/name>: traefik
<http://helm.sh/chart|helm.sh/chart>: traefik-9.18.0
<http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
<http://app.kubernetes.io/instance|app.kubernetes.io/instance>: traefik
annotations:
spec:
type: LoadBalancer
selector:
<http://app.kubernetes.io/name|app.kubernetes.io/name>: traefik
<http://app.kubernetes.io/instance|app.kubernetes.io/instance>: traefik
ports:
- port: 80
name: web
targetPort: "web"
protocol: "TCP"
- port: 443
name: websecure
targetPort: "websecure"
protocol: "TCP"
damp-school-17708
03/25/2021, 12:03 PMerror: could not deserialize deployment: unexpected end of JSON input
adorable-musician-67025
03/25/2021, 1:27 PMadorable-musician-67025
03/25/2021, 1:28 PMadorable-musician-67025
03/25/2021, 1:37 PMbumpy-laptop-30846
03/25/2021, 1:48 PMloud-helicopter-75345
03/25/2021, 2:02 PMpulumi login --local
However I'm unclear on how to switch back again as this doesn't seem as simple. I'm currently at:
pulumi logout; pulumi login
Manage your Pulumi stacks by logging in.
Run `pulumi login --help` for alternative login options.
Enter your access token from <https://app.pulumi.com/account/tokens>
or hit <ENTER> to log in using your browser :
Open the browser, login to pulumi.com, create a new token, paste it into the terminal.
I already have a login and token so why is this needed? Is there something as simple as switching to a local backend? e.g.
pulumi login --standard
tall-shoe-66375
03/25/2021, 2:17 PMhundreds-mouse-62204
03/25/2021, 2:25 PMtall-shoe-66375
03/25/2021, 2:53 PMpulumi import gcp:sql/databaseInstance:DatabaseInstance db_instance projects/mystical-moon-307818/instances/prod-mysql
Error
gcp:sql:DatabaseInstance (db_instance):
error: gcp:sql/databaseInstance:DatabaseInstance resource 'db_instance' has a problem: AtLeastOne: "settings": one of `clone,settings` must be specified
error: gcp:sql/databaseInstance:DatabaseInstance resource 'db_instance' has a problem: AtLeastOne: "clone": one of `clone,settings` must be specified
error: Preview failed: one or more inputs failed to validate
agreeable-ram-97887
03/25/2021, 5:12 PMpulumi up
/ pulumi preview
in a gitlab CICD script with docker resources? If so would you mind sharing how you've configured your pipeline? Or at least giving some hint about the "right" way to do it.
When I try this myself, I unfortunately keep getting the error FileNotFoundError: [Errno 2] No such file or directory: 'docker': 'docker'
, and I'm not sure what to make of that 🤔agreeable-ram-97887
03/25/2021, 5:12 PMpulumi up
/ pulumi preview
in a gitlab CICD script with docker resources? If so would you mind sharing how you've configured your pipeline? Or at least giving some hint about the "right" way to do it.
When I try this myself, I unfortunately keep getting the error FileNotFoundError: [Errno 2] No such file or directory: 'docker': 'docker'
, and I'm not sure what to make of that 🤔billowy-army-68599
03/25/2021, 5:14 PMagreeable-ram-97887
03/25/2021, 5:35 PMimage: python:3.7.9-buster
before_script:
- apt-get update -y
- apt-get install sudo -y
- python3 -m venv infra/venv
- infra/venv/bin/python -m pip install --upgrade pip setuptools wheel
- infra/venv/bin/python -m pip install -r infra/requirements.txt
- bash ./pulumiSetup/setup.sh
stages:
- preview
- deploy
pulumi-preview:
stage: preview
services:
- docker:dind
script:
- bash ./pulumiSetup/pulumi-preview.sh
pulumi-deploy:
stage: deploy
services:
- docker:dind
script:
- bash ./pulumiSetup/pulumi-up.sh
only:
- master
pulumiSetup/setup.sh
is like this:
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y
curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN
# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login
curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
pulumiSetup/pulumi-preview.sh
is like this:
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Add the pulumi CLI to the PATH
export PATH=$PATH:$HOME/.pulumi/bin
# AWS creds here - variables with $ to be set on gitlab var env
aws configure set default.region '$AWS_DEFAULT_REGION'
aws configure set aws_access_key_id '$AWS_ACCESS_KEY_ID'
aws configure set aws_secret_access_key '$AWS_SECRET_ACCESS_KEY'
echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY
pulumi stack select accure1/dev --cwd "/builds/accure1/code/el/corvus/infra/"
# preview configuration before deployment
pulumi preview --cwd "/builds/accure1/code/el/corvus/infra/"
billowy-army-68599
03/25/2021, 5:41 PMwhite-secretary-18260
03/25/2021, 5:42 PMdocker in docker,
yes.Dockerfile
with:
# SETUP DOCKER
RUN curl -fsSL <https://get.docker.com> -o get-docker.sh
RUN sudo sh get-docker.sh
RUN sudo service docker start
sudo
RUN apt-get install sudo -y
agreeable-ram-97887
03/25/2021, 6:37 PMpulumi preview
call 🤔 . Any ideas?
Btw, the new pulumiSetup/setup.sh
script that im using is (note the additional install docker lines):
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y
# SETUP DOCKER
curl -fsSL <https://get.docker.com> -o get-docker.sh
sudo sh get-docker.sh
sudo service docker start
# INSTALL PULUMI
curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN
# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login
curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
white-secretary-18260
03/25/2021, 6:49 PM--verbose 999
on there and see what it brings.agreeable-ram-97887
03/25/2021, 7:27 PMpulumi preview
. I'm running it again now with the increased verbosity, so hopefully will have some more info soon. But anyway I guess I'll need to implement some sort of caching of the image getting built