https://pulumi.com logo
#general
Title
# general
s

stale-autumn-24797

08/06/2019, 1:19 AM
I’m getting the following error when using the Pulumi Azure DevOps release task to run pulumi up:
Copy code
2019-08-05T19:10:09.1841769Z ##[section]Starting: Run pulumi  
2019-08-05T19:10:09.1845138Z ==============================================================================
2019-08-05T19:10:09.1845233Z Task         : Pulumi Azure Pipelines Task
2019-08-05T19:10:09.1845346Z Description  : Azure Pipelines task extension for running Pulumi apps.
2019-08-05T19:10:09.1845410Z Version      : 0.1.19
2019-08-05T19:10:09.1845509Z Author       : Pulumi
2019-08-05T19:10:09.1845565Z Help         : Join us on Slack at <https://slack.pulumi.io>.
2019-08-05T19:10:09.1845633Z ==============================================================================
2019-08-05T19:10:09.3946841Z Downloading: <https://get.pulumi.com/releases/sdk/pulumi-v0.17.27-linux-x64.tar.gz>
2019-08-05T19:10:09.7313899Z Extracting archive
2019-08-05T19:10:09.7348031Z [command]/bin/tar xzC /home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445 -f /home/vsts/work/_temp/5888e3ed-db52-4523-9c13-87a924a0050d
2019-08-05T19:10:10.8380108Z Prepending PATH environment variable with directory: /home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445/pulumi
2019-08-05T19:10:10.8388818Z [command]/home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445/pulumi/pulumi version
2019-08-05T19:10:10.9270755Z v0.17.27
2019-08-05T19:10:10.9325912Z [command]/home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445/pulumi/pulumi login
2019-08-05T19:10:11.4999524Z Logged into <http://pulumi.com|pulumi.com> as mike (<https://app.pulumi.com/mike>)
2019-08-05T19:10:11.5044407Z [command]/home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445/pulumi/pulumi stack select mike/microservice-aks-deploy/mapper
2019-08-05T19:10:12.3840915Z [command]/home/vsts/work/_temp/1ad4480f-4b59-4fed-9e58-4f008e359445/pulumi/pulumi up --yes
2019-08-05T19:10:13.3621045Z Previewing update (mapper):
2019-08-05T19:10:14.2525744Z error: could not load plugin for kubernetes provider 'urn:pulumi:mapper::microservice-aks-deploy::pulumi:providers:kubernetes::inflation_provider': no resource plugin 'kubernetes' found in the workspace or on your $PATH
2019-08-05T19:10:14.2611968Z ##[error]Pulumi command exited with code '255' while trying to run 'up --yes'.
2019-08-05T19:10:14.2686239Z ##[section]Finishing: Run pulumi
Any ideas on how to fix this?
c

clever-sunset-76585

08/06/2019, 1:39 AM
Assuming you have a TypeScript-based Pulumi program, did you run
yarn install
or
npm install
prior to running
pulumi up/preview
? If not, you must do that first.
You can use the built-in
NodeTool
task to run
npm install
or
npm ci
to restore your program’s dependencies, which will install the required plugins as well.
s

stale-autumn-24797

08/06/2019, 5:46 PM
I’m using a python based Pulumi program. So in that case I need to pip install requirements.txt?
c

clever-sunset-76585

08/06/2019, 5:48 PM
Yep. That’s correct.
s

stale-autumn-24797

08/06/2019, 6:04 PM
I’m getting an error now during the pip install of requirements.txt.
c

clever-sunset-76585

08/06/2019, 6:22 PM
Hmm it seems to have failed while installing the
pulumi-azure
plugin.
Copy code
Installing collected packages: six, grpcio, dill, protobuf, pulumi, arpeggio, attrs, parver, semver, pulumi-azure, chardet, urllib3, idna, certifi, requests, pyyaml, pulumi-kubernetes
2019-08-06T18:03:23.2279798Z   Running setup.py install for pulumi-azure: started
2019-08-06T18:03:24.0119638Z     Running setup.py install for pulumi-azure: finished with status 'error'
2019-08-06T18:03:24.0147419Z     ERROR: Command errored out with exit status 1:
2019-08-06T18:03:24.0148819Z      command: /opt/hostedtoolcache/Python/3.7.4/x64/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l8vhhgc7/pulumi-azure/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l8vhhgc7/pulumi-azure/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1_s31y8g/install-record.txt --single-version-externally-managed --compile
2019-08-06T18:03:24.0149783Z          cwd: /tmp/pip-install-l8vhhgc7/pulumi-azure/
…and later at the end of that log:
Copy code
2019-08-06T18:03:24.0781852Z     error: [Errno 2] No such file or directory: 'pulumi': 'pulumi'
2019-08-06T18:03:24.0782109Z     ----------------------------------------
2019-08-06T18:03:24.0783054Z ERROR: Command errored out with exit status 1: /opt/hostedtoolcache/Python/3.7.4/x64/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l8vhhgc7/pulumi-azure/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l8vhhgc7/pulumi-azure/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1_s31y8g/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
2019-08-06T18:03:24.1501751Z ##[error]Bash exited with code '1'.
cc: @white-balloon-205 @stocky-spoon-28903 to see if they have any suggestions here.
s

stocky-spoon-28903

08/06/2019, 6:23 PM
Do you have the full output (as alluded to in that snippet?)
s

stale-autumn-24797

08/06/2019, 6:45 PM
I think that is the full log. Let me know if you need additional information.
c

clever-sunset-76585

08/06/2019, 6:47 PM
Do you have the full output (as alluded to in that snippet?)
It was posted just before my reply with the error snippet, but I think Slack hid it.
s

stale-autumn-24797

08/07/2019, 5:55 PM
@stocky-spoon-28903, do you need any more information from me?
c

clever-sunset-76585

08/09/2019, 9:29 PM
@stale-autumn-24797 sorry for the late reply in getting back to you. I assume this is still a problem for you? If so, can you please paste the contents of your
requirements.txt
file here?
s

stale-autumn-24797

08/12/2019, 5:34 AM
pulumi>=0.17.23 pulumi_azure>=0.17.23 pulumi_kubernetes>=0.22.2
@clever-sunset-76585 any thoughts? This issue is preventing me from automating my deployments.
g

gentle-diamond-70147

08/13/2019, 4:29 PM
@stale-autumn-24797 can you share your full
azure-pipelines.yml
?
s

stale-autumn-24797

08/13/2019, 8:44 PM
I’m using a release pipeline, so let me see if I can get the yaml for the whole thing (instead of each step individually).
This is my first task. Installing the python version. Im running on an ubuntu 16.04 machine.
This is my second task where I perform the pip install.
The second task is the one that fails.
g

gentle-diamond-70147

08/13/2019, 10:20 PM
just to clarify - your
vmImage
is
'ubuntu-16.04'
exactly?
s

stale-autumn-24797

08/13/2019, 10:22 PM
Yes, that is what I have been using. Note that I am in the process of trying to move this over to a YAML build / release pipeline, so it may be that the YAML that you provided above will work for me in the new pipeline. I’m hoping to wrap that work up shortly and I’ll keep you posted on how it goes.
Here is some updated yaml using the Azure DevOps multi-stage pipeline support (in preview). I’m getting the same error (full logs in a following snippet).
Logs from install deps.
Okay, so I figured this out. I first need to run a pulumi command before I do the pip install. So the above ordering seems to work…
g

gentle-diamond-70147

08/14/2019, 3:18 PM
Hmm, that's strange.
s

stale-autumn-24797

08/14/2019, 5:06 PM
Is there a dependency between your pip install and the pulumi cli being present? Running the pulumi config command seems to perform some basic init on the machine and pulls down the pulumi binaries.
g

gentle-diamond-70147

08/14/2019, 8:13 PM
I don't believe so, no.
s

stale-autumn-24797

08/18/2019, 11:17 PM
Can you think of any other reason why switching the ordering would fix the issue? It was the only change that I made.
14 Views