Skip to content
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

Added src/docker/Dockerfile #83

Merged
merged 6 commits into from
Apr 13, 2016
Merged

Added src/docker/Dockerfile #83

merged 6 commits into from
Apr 13, 2016

Conversation

amihaiemil
Copy link
Member

PR regarding issue #82 . As explained by @original-brownbear , first step is to add this file, then build and push the image to Dockerhub, and then specify that image in .rultor.yml .

@amihaiemil
Copy link
Member Author

@original-brownbear Who has to build the image and push it to dockerhub? I suppose Yegor, since rultor's image is also under his name.

@original-brownbear
Copy link

@amihaiemil yes @yegor256 needs to setup an automated build for this.

@dmarkov
Copy link

dmarkov commented Apr 5, 2016

@amihaiemil Many thanks, I will find someone to review it before we merge

@dmarkov
Copy link

dmarkov commented Apr 5, 2016

@mkordas could you please review this pull request

@amihaiemil
Copy link
Member Author

@mkordas Yegor has to setup automated build of the image on Dockerhub and then I have to specify the image in .rultor.yml. cc: @yegor256

@mkordas
Copy link

mkordas commented Apr 5, 2016

@amihaiemil I'm on it

#RUN /bin/bash -l -c "gem update"
#RUN /bin/bash -l -c "gem install nokogiri"
#RUN /bin/bash -l -c "gem install bundler"
#RUN echo 'source /usr/share/rvm/scripts/rvm' >> /etc/bash.bashrc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil If it's commented out, why not delete it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkordas I removed commented block.

@mkordas
Copy link

mkordas commented Apr 5, 2016

@amihaiemil please see inital review. I think we should begin with minimal image instead.

@mkordas
Copy link

mkordas commented Apr 6, 2016

@amihaiemil I'm back

@mkordas
Copy link

mkordas commented Apr 6, 2016

@original-brownbear I need hour advice here - should we clean the things up here or leave as it is? E.g. nodejs is clearly not needed, but @amihaiemil did what he was told to do - just copy the image.

@@ -0,0 +1,97 @@
# Copyright (c) 2012-2015, jcabi.com
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil now we need to upload this image to Docker Hub

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil and of course update .rultor.yml to use it

@original-brownbear
Copy link

@mkordas sure :) Damn looking at that ticket again it's worded in a little unfortunate manner :)

But agreed, simply copying the image was my suggested quick fix, obviously it's not even close to being an optimal solution. In a sense it is my mistake not that of the performer that the description leads to a rather iffy solution now.
Maybe ask the architect here too, but I think it would be "fair" in the sense that the performer only has to resolve the actual stated issue, not an issue refined by the author in hindsight to simply:

  • Remove the apt-get update && apt-get upgrade stuff because it's really bad
  • Add a puzzle asking to clean up the image removing unnecessary things from it and locking in all versions 100%.

Makes sense ? :)

@amihaiemil
Copy link
Member Author

@mkordas As the author suggested, I removed the apt-get upgrate/update commands and added puzzle for packages version lock. Yegor has to set automated build of the image on Dockerhub, not me. After he is done, I willl specify the image in .rultor.yml.

@mkordas
Copy link

mkordas commented Apr 6, 2016

@amihaiemil I will check it now

@@ -95,6 +95,9 @@
* and verify the expected HTTP requests have been sent to the mocked server.
* @todo #69:30min Fix NullPointerExceptions in CL build for Open JDK6.
* @todo #69:30min Fix UnsupportedClassVersionError in CL build for Open JDK6.
* @todo #82:30min Clean unnecessary docker setup (src/docler/Dockerfile) and set
* versions to the used packages (e.g. lock java version instead of default
* jdk). Discuss with architect.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amihaiemil I don't think that much discussion is needed here. I would stress that the goal here is to have minimal docker image with all versions locked that is enough to build this project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkordas I meant discuss the needed versions. Because for sure, the first question will be "OK, but what versions exactly are needed?"

@mkordas
Copy link

mkordas commented Apr 6, 2016

@amihaiemil so we need additional puzzle just for Yegor, right? How we are going to track these tasks?

@mkordas
Copy link

mkordas commented Apr 6, 2016

@amihaiemil please see my comments above

@original-brownbear
Copy link

@mkordas yes, Yegor needs to do this.

@mkordas
Copy link

mkordas commented Apr 12, 2016

@yegor256 please merge with a button as explained by @original-brownbear above

@yegor256 yegor256 merged commit 25798b6 into jcabi:master Apr 13, 2016
@yegor256
Copy link
Member

@amihaiemil merged

@amihaiemil
Copy link
Member Author

@yegor256 Thanks

@mkordas
Copy link

mkordas commented Apr 14, 2016

@original-brownbear @yegor256 maybe let's try to do the deployment with a new image

@mkordas
Copy link

mkordas commented Apr 14, 2016

@rultor deploy

@rultor
Copy link
Contributor

rultor commented Apr 14, 2016

@rultor deploy

@mkordas Thanks for your request. @yegor256 Please confirm this.

@original-brownbear
Copy link

@mkordas yea that should work, otherwise we need to reopen the issue I'm afraid.

@dmarkov
Copy link

dmarkov commented Apr 14, 2016

@mkordas Thank you, I have added 52 mins to your account in payment/transaction "570f9b99c1b2190a20000319", time consumed: 194 hours and 57 mins; you're getting extra minutes here (c=37); +52 added to your rating, current score is: +8571

@dmarkov
Copy link

dmarkov commented Apr 14, 2016

@rultor deploy now pls

@rultor
Copy link
Contributor

rultor commented Apr 14, 2016

@rultor deploy now pls

@dmarkov OK, I'll try to deploy now. You can check the progress here

@rultor
Copy link
Contributor

rultor commented Apr 14, 2016

@rultor deploy now pls

@amihaiemil @dmarkov Oops, I failed. You can see the full log here (spent 24s)

+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 359
+ echo '1.61.8 b552866'
1.61.8 b552866
+ date
Thu Apr 14 13:33:07 UTC 2016
+ uptime
 13:33:07 up 13 days, 18:24,  0 users,  load average: 4.58, 5.31, 4.13
+ [email protected]:jcabi/jcabi-aether.git
+ head_branch=master
+ vars=('--env=MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g' '[email protected]:jcabi/jcabi-aether.git' '--env=head_branch=master')
+ image=yegor256/jcabi-aether
+ directory=
+ scripts=('sudo gem install --no-ri --no-rdoc pdd' ';' 'sudo gem install --no-ri --no-rdoc est' ';' 'mvn clean deploy -Pqulice --errors --settings ../settings.xml' ';' 'mvn clean' ';' 'pdd --source=$(pwd) --verbose --file=jcabi-aether.xml' ';' 's3cmd --no-progress put jcabi-aether.xml --config=../s3cfg s3://pdd.teamed.io/jcabi-aether.xml' ';' 'est --dir=./est --verbose --file=jcabi-aether.xml --format=xml' ';' 's3cmd --no-progress put jcabi-aether.xml --config=../s3cfg s3://est.teamed.io/jcabi-aether.xml' ';')
+ squash=false
+ ff=default
+ rebase=false
+ container=jcabi_jcabi-aether_83
+ as_root=false
+ mkdir -p /home/rultor/.ssh
+ echo -e 'Host github.com\n\tStrictHostKeyChecking no\n'
+ chmod 600 /home/rultor/.ssh/config
+ git clone [email protected]:jcabi/jcabi-aether.git repo
Cloning into 'repo'...
+ cd repo
+ git config user.email [email protected]
+ git config user.name rultor
+ '[' -z 'sudo gem install --no-ri --no-rdoc pdd' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'sudo gem install --no-ri --no-rdoc pdd' ';' 'sudo gem install --no-ri --no-rdoc est' ';' 'mvn clean deploy -Pqulice --errors --settings ../settings.xml' ';' 'mvn clean' ';' 'pdd --source=$(pwd) --verbose --file=jcabi-aether.xml' ';' 's3cmd --no-progress put jcabi-aether.xml --config=../s3cfg s3://pdd.teamed.io/jcabi-aether.xml' ';' 'est --dir=./est --verbose --file=jcabi-aether.xml --format=xml' ';' 's3cmd --no-progress put jcabi-aether.xml --config=../s3cfg s3://est.teamed.io/jcabi-aether.xml' ';'
+ rm -rf .gpg
+ cd repo
+ docker_when_possible
+ true
++ sed 's/ /\n/g'
++ tail -n 1
++ uptime
+ load=4.16
++ bc
++ echo 4.16 '>' 30
+ '[' 0 -eq 1 ']'
+ echo 'load average is 4.16, low enough to run a new Docker container'
load average is 4.16, low enough to run a new Docker container
+ break
+ cd ..
+ '[' -n '' ']'
+ use_image=yegor256/jcabi-aether
+ docker pull yegor256/jcabi-aether
Using default tag: latest
Pulling repository docker.io/yegor256/jcabi-aether
Tag latest not found in repository docker.io/yegor256/jcabi-aether
'cid' file is absent, container wasn't started correctly

@amihaiemil
Copy link
Member Author

@original-brownbear Do you happen to know what went wrong? It seems to me some config on Yegor's DockerHub? He needs to define the 'latest' tag?

@original-brownbear
Copy link

@amihaiemil yes exactly, latest is missing.

@amihaiemil
Copy link
Member Author

amihaiemil commented Apr 15, 2016

@yegor256 Can you pls define the latest tag, so the build passes? Issue #78 depends on this since the PR for it cannot be merged. Thanks.

@yegor256
Copy link
Member

@amihaiemil it is "defined", as far as I understand:

screen shot 2016-04-17 at 7 21 18 pm

If you need me to do something else, please give more detailed instructions

@original-brownbear
Copy link

@yegor256 The build for this thing failed ...
screen shot 2016-04-17 at 19 24 09

maybe hit the trigger button there and see if it works on retry before the Dockerfile issue gets reopened ... ( maybe we get lucky and it was just a random apt issue, seems it didn't find some package from the Dockerhub logs).

@yegor256
Copy link
Member

@original-brownbear triggered it a second ago... let's wait

@original-brownbear
Copy link

original-brownbear commented Apr 17, 2016

@yegor256 it cannot work ... The Dockerfile contains this :

RUN apt-get update & apt-get install -y \

one & where we need && ... don't think this warrants a ticket really right?, maybe you just push the fix for that?
Here: https://github.com/jcabi/jcabi-aether/blob/master/src/docker/Dockerfile#L44

yegor256 pushed a commit that referenced this pull request Apr 17, 2016
@yegor256
Copy link
Member

@original-brownbear fixed in 5f445b0

@original-brownbear
Copy link

original-brownbear commented Apr 17, 2016

@yegor256 phew ... you fixed it in a different instance 2 occurrences left still:
https://github.com/jcabi/jcabi-aether/blob/master/src/docker/Dockerfile#L57
https://github.com/jcabi/jcabi-aether/blob/master/src/docker/Dockerfile#L44

how on earth did we all miss that when reviewing this ...

yegor256 pushed a commit that referenced this pull request Apr 17, 2016
@yegor256
Copy link
Member

@original-brownbear fixed in 9b81a37

@original-brownbear
Copy link

original-brownbear commented Apr 17, 2016

@yegor256 thanks! looks good now, build on Dockerhub worked, I guess we can try deploying again :)

@yegor256
Copy link
Member

@original-brownbear cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants