New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: bake aws into the builder image #31412

Merged
merged 1 commit into from Oct 16, 2018

Conversation

Projects
None yet
3 participants
@petermattis
Contributor

petermattis commented Oct 16, 2018

Release note: None

@petermattis petermattis requested a review from cockroachdb/build-prs as a code owner Oct 16, 2018

@cockroach-teamcity

This comment has been minimized.

Show comment
Hide comment
@cockroach-teamcity

cockroach-teamcity Oct 16, 2018

Member

This change is Reviewable

Member

cockroach-teamcity commented Oct 16, 2018

This change is Reviewable

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Gah, apparently this installs a version of aws that is too old:

> /home/agent/work/.go/bin/roachprod create teamcity-968270-kv95-encrypt-false-nodes-1 -n 2 --clouds=aws --aws-machine-type-ssd=m5d.2xlarge
Creating cluster teamcity-968270-kv95-encrypt-false-nodes-1 with 2 nodes
2018/10/16 00:06:48 imported ${HOME}/.ssh/id_rsa.pub as teamcity-runner-w3i2u7tBwUAjM4_HewnqvX8mV44= in region us-east-2
2018/10/16 00:06:49 imported ${HOME}/.ssh/id_rsa.pub as teamcity-runner-w3i2u7tBwUAjM4_HewnqvX8mV44= in region us-west-2
2018/10/16 00:06:49 usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: --tag-specifications, ResourceType=instance,Tags=[{Key=Lifetime,Value=12h0m0s},{Key=Name,Value=teamcity-968270-kv95-encrypt-false-nodes-1-0001},{Key=Roachprod,Value=true},]

I saw exactly this same error locally and had to upgrade aws. My apt-get fu is weak. How do I track down a newer apt-installable version?

Contributor

petermattis commented Oct 16, 2018

Gah, apparently this installs a version of aws that is too old:

> /home/agent/work/.go/bin/roachprod create teamcity-968270-kv95-encrypt-false-nodes-1 -n 2 --clouds=aws --aws-machine-type-ssd=m5d.2xlarge
Creating cluster teamcity-968270-kv95-encrypt-false-nodes-1 with 2 nodes
2018/10/16 00:06:48 imported ${HOME}/.ssh/id_rsa.pub as teamcity-runner-w3i2u7tBwUAjM4_HewnqvX8mV44= in region us-east-2
2018/10/16 00:06:49 imported ${HOME}/.ssh/id_rsa.pub as teamcity-runner-w3i2u7tBwUAjM4_HewnqvX8mV44= in region us-west-2
2018/10/16 00:06:49 usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help

Unknown options: --tag-specifications, ResourceType=instance,Tags=[{Key=Lifetime,Value=12h0m0s},{Key=Name,Value=teamcity-968270-kv95-encrypt-false-nodes-1-0001},{Key=Roachprod,Value=true},]

I saw exactly this same error locally and had to upgrade aws. My apt-get fu is weak. How do I track down a newer apt-installable version?

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Switched to explicitly download the awslci-bundle from amazon and installing it. Easier than figuring out if there is an up to date apt-get source or using pip.

Contributor

petermattis commented Oct 16, 2018

Switched to explicitly download the awslci-bundle from amazon and installing it. Easier than figuring out if there is an up to date apt-get source or using pip.

@benesch

This comment has been minimized.

Show comment
Hide comment
@benesch

benesch Oct 16, 2018

Member

Switched to explicitly download the awslci-bundle from amazon and installing it. Easier than figuring out if there is an up to date apt-get source or using pip.

That's exactly what I was about to recommend. I'm not seeing a maintained PPA for awscli, and getting pip to work right in the builder would be a hassle, so I think the bundle is the way to go.

Member

benesch commented Oct 16, 2018

Switched to explicitly download the awslci-bundle from amazon and installing it. Easier than figuring out if there is an up to date apt-get source or using pip.

That's exactly what I was about to recommend. I'm not seeing a maintained PPA for awscli, and getting pip to work right in the builder would be a hassle, so I think the bundle is the way to go.

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Ugh, what is this failure about. https://teamcity.cockroachdb.com/viewLog.html?buildId=968385&tab=buildLog

[01:20:43][Step 2/2] Status: Downloaded newer image for cockroachdb/builder:20181015-210651
[01:20:50][Step 2/2] Traceback (most recent call last):
[01:20:50][Step 2/2]   File "/usr/bin/../lib/google-cloud-sdk/lib/gcloud.py", line 20, in <module>
[01:20:50][Step 2/2]     from __future__ import absolute_import
[01:20:50][Step 2/2] ImportError: No module named __future__

It happened twice, so it isn't a fluke.

Contributor

petermattis commented Oct 16, 2018

Ugh, what is this failure about. https://teamcity.cockroachdb.com/viewLog.html?buildId=968385&tab=buildLog

[01:20:43][Step 2/2] Status: Downloaded newer image for cockroachdb/builder:20181015-210651
[01:20:50][Step 2/2] Traceback (most recent call last):
[01:20:50][Step 2/2]   File "/usr/bin/../lib/google-cloud-sdk/lib/gcloud.py", line 20, in <module>
[01:20:50][Step 2/2]     from __future__ import absolute_import
[01:20:50][Step 2/2] ImportError: No module named __future__

It happened twice, so it isn't a fluke.

Show outdated Hide outdated build/builder/Dockerfile Outdated
Show outdated Hide outdated build/builder/Dockerfile Outdated
@benesch

This comment has been minimized.

Show comment
Hide comment
@benesch

benesch Oct 16, 2018

Member

It happened twice, so it isn't a fluke.

I think ./awscli-bundle/install -i /usr/local/ aws has a stray space in it and it therefore might have wiped the contents of /usr/local in weird and arbitrary ways.

Member

benesch commented Oct 16, 2018

It happened twice, so it isn't a fluke.

I think ./awscli-bundle/install -i /usr/local/ aws has a stray space in it and it therefore might have wiped the contents of /usr/local in weird and arbitrary ways.

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Ah, good catch. I've fixed that. Let me see if this gets me farther.

Contributor

petermattis commented Oct 16, 2018

Ah, good catch. I've fixed that. Let me see if this gets me farther.

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

And we're running a roachtest on AWS!

Contributor

petermattis commented Oct 16, 2018

And we're running a roachtest on AWS!

@benesch

Doesn't look like you actually pushed your latest revision?

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Just adding an extra level of difficulty to the review. Pushed.

Contributor

petermattis commented Oct 16, 2018

Just adding an extra level of difficulty to the review. Pushed.

@benesch

LGTM!

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

Thanks, though see #31416. Some aws initialization or something is missing. I think this PR is fine, but I'll hold off on merging it until we get that issue figured out.

Contributor

petermattis commented Oct 16, 2018

Thanks, though see #31416. Some aws initialization or something is missing. I think this PR is fine, but I'll hold off on merging it until we get that issue figured out.

@petermattis

This comment has been minimized.

Show comment
Hide comment
@petermattis

petermattis Oct 16, 2018

Contributor

bors r=benesch

Contributor

petermattis commented Oct 16, 2018

bors r=benesch

craig bot pushed a commit that referenced this pull request Oct 16, 2018

Merge #31412
31412: build: bake aws into the builder image r=benesch a=petermattis

Release note: None

Co-authored-by: Peter Mattis <petermattis@gmail.com>
@craig

This comment has been minimized.

Show comment
Hide comment
@craig

craig bot commented Oct 16, 2018

Build succeeded

@craig craig bot merged commit 586fbdc into cockroachdb:master Oct 16, 2018

3 checks passed

GitHub CI (Cockroach) TeamCity build finished
Details
bors Build succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@petermattis petermattis deleted the petermattis:pmattis/builder-aws branch Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment