You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/12 20:35:47 UTC

[GitHub] [cloudstack] tetra12 opened a new pull request #5310: Support docker builds for ubuntu 20.04

tetra12 opened a new pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310


   ### Description
   
   This PR
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   Updates debian build rules to support custom build flow with Docker and use of the latest Node and Maven versions.
   
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   ![cs-debs](https://user-images.githubusercontent.com/45828526/129264895-0cb8831e-9514-453c-b079-9e8967da7cd6.png)
    
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   1. Checked out the latest CloudStack master
   2. Built a docker builder image for Ubuntu 20.04 and published it [here](https://hub.docker.com/r/tampler/cs-deb)
   3. Created the `deb` files for Ubuntu 20.04 with the following command: `docker run -v $PWD/cloudstack:/mnt/build/cloudstack tampler/cs-deb:2004 /usr/local/bin/docker-entrypoint.sh`
   4. Uploaded *.deb binaries and installed on a cloud server
   5. Launched CloudStack mgmt server and GUI
   ![screen gui](https://user-images.githubusercontent.com/45828526/129265813-5072aaa9-790a-42ec-b3b6-77ef6ebff3d1.png)
   
   
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] RodrigoDLopez commented on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
RodrigoDLopez commented on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-898067883


   Hey @tampler
   To build my projects, I use that project I mentioned in Slack earlier, created and maintained by @khos2ow (https://github.com/khos2ow/cloudstack-deb-builder).
   I made a  [PR](https://github.com/khos2ow/cloudstack-deb-builder/pull/23) in this repository with some changes that allowed to generate packages using Ubuntu 20.04 (Focal) as a base.
   
   I haven't published the generated image, but it is possible to generate a local image and use it to compile your packages easily.
   
   Here is a simple screenshot to show the successful execution of the instance docker. 
   ![image](https://user-images.githubusercontent.com/19981369/129287395-28ec64f3-71db-40ad-abc0-d3aa495ce4b0.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] tetra12 closed pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
tetra12 closed pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] tetra12 commented on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
tetra12 commented on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-898541066


   Hello @GabrielBrascher 
   
   My Dockerfile and the one from @RodrigoDLopez are derived from the same source and clearly both do the job providing a containerized build env for Ubuntu 20.04.
   
   The biggest difference is that my Dockerfile uses custom(the latest!) versions of Node, Maven and Python, which are downloaded as binaries. Downloading the binaries serves three purposes:
   
   1. Easily change the version of the package during dev/CI/test builds
   2. Minimize the docker build runtime by having several stages, which are separately and efficiently cached and reused during fails/restarts 
   3. Minimize the image size ( no caching, no extra deps, just download-extract-use)
    
   The change in CS build flow was required since the current CS packager looks into only Ubuntu 20.04 apt packages and thinks that custom deps are NOT installed and fails on dependency checking. 
   
   Plus, I have published my ready-to-use container [here](https://hub.docker.com/r/tampler/cs-deb). I can contribute with adding other building images, including CentOS 7/8, Ubuntu 18.04 and Ubuntu 21.04


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] tetra12 commented on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
tetra12 commented on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-991971967


   Closing due to inactivity


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] RodrigoDLopez edited a comment on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
RodrigoDLopez edited a comment on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-898067883


   Hey @tampler
   To build my projects, I use that project I mentioned in Slack earlier, created and maintained by @khos2ow (https://github.com/khos2ow/cloudstack-deb-builder).
   I made a  [PR](https://github.com/khos2ow/cloudstack-deb-builder/pull/23) in this repository with some changes that allowed to generate packages using Ubuntu 20.04 (Focal) as a base.
   
   I haven't published the generated image, but it is possible to generate a local image and use it to compile your packages easily.
   
   Here is a simple screenshot to show the successful execution of the instance docker building the current main. 
   ![image](https://user-images.githubusercontent.com/19981369/129287395-28ec64f3-71db-40ad-abc0-d3aa495ce4b0.png)
   
   Another one building the current 4.15 branch.
   ![image](https://user-images.githubusercontent.com/19981369/129291552-25b04a87-8cf7-42d4-ae21-c96736d346d1.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#discussion_r707963322



##########
File path: debian/control
##########
@@ -2,8 +2,7 @@ Source: cloudstack
 Section: libs
 Priority: extra
 Maintainer: Wido den Hollander <wi...@widodh.nl>
-Build-Depends: debhelper (>= 9), openjdk-11-jdk | java11-sdk | java11-jdk | zulu-11, genisoimage,
- python-mysql.connector | python3-mysql.connector, maven (>= 3) | maven3, python (>= 2.7), python3 (>= 3), nodejs (>= 12), lsb-release, dh-systemd, python-setuptools

Review comment:
       Your change breaks packaging 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] tetra12 commented on a change in pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
tetra12 commented on a change in pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#discussion_r694574376



##########
File path: debian/control
##########
@@ -2,8 +2,7 @@ Source: cloudstack
 Section: libs
 Priority: extra
 Maintainer: Wido den Hollander <wi...@widodh.nl>
-Build-Depends: debhelper (>= 9), openjdk-11-jdk | java11-sdk | java11-jdk | zulu-11, genisoimage,
- python-mysql.connector | python3-mysql.connector, maven (>= 3) | maven3, python (>= 2.7), python3 (>= 3), nodejs (>= 12), lsb-release, dh-systemd, python-setuptools

Review comment:
       Hello @rhtyd I disagree with your statement. My change doesn't affect the code base - only the build flow, which is currently over constrained. 
   
   Over constrained means that you forced it to use deps versions, shipped with the distribution (Ubuntu 20.04 apt in this case).
   
   Some packages are no longer available in 21.04, as mentioned #5350 . For some deps, like Maven and Node you don't get the latest version easily, which I easily do [here](https://github.com/tetra12/cloudstack-deb-builder/blob/7be9703ee9d031743c32be4c97ac124616593593/ubuntu2004/Dockerfile#L57).
   
   I was able to build ACS and make it up&running with this script for Ubuntu 21.04 and a customized `qemu` and `libvirt`, cloned from git from master. Thus I guarantee that this works fine for Ubuntu 20.04+
   
   If you don't see a value in supporting the latest versions of Ubuntu, Maven, Node, Qemu and Libvirt, feel free to close this PR




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] tetra12 commented on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
tetra12 commented on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-897954272


   This PR allows to use the latest NodeJS, Maven and Python2 deps, which are NOT present in the 20.04 (focal) apt repo.
   
   That's why I had to remove some dependencies from rules, since the packager won't detect custom installation for Node, Maven and Python.
   
   I assume this will not be an issue for those, who wanna build `*.deb` locally, since build flow will yield an error downstream if any deps are missing.
   
   Docker image simplifies building CloudStack and gives a single immutable image, which can used locally, for testing, CI, CD, etc
   
   To build `deb` files for Ubuntu 20.04, run this:
   `docker run -v $PWD/cloudstack:/mnt/build/cloudstack tampler/cs-deb:2004 /usr/local/bin/docker-entrypoint.sh`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#issuecomment-925510449


   Needs to be revisited as it may cause regressions as stated in the review comments


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] rhtyd commented on a change in pull request #5310: Support docker builds for ubuntu 20.04

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #5310:
URL: https://github.com/apache/cloudstack/pull/5310#discussion_r691867490



##########
File path: debian/control
##########
@@ -2,8 +2,7 @@ Source: cloudstack
 Section: libs
 Priority: extra
 Maintainer: Wido den Hollander <wi...@widodh.nl>
-Build-Depends: debhelper (>= 9), openjdk-11-jdk | java11-sdk | java11-jdk | zulu-11, genisoimage,
- python-mysql.connector | python3-mysql.connector, maven (>= 3) | maven3, python (>= 2.7), python3 (>= 3), nodejs (>= 12), lsb-release, dh-systemd, python-setuptools

Review comment:
       Removing some of the dependencies such as maven3, nodejs is not correct - these are build dependencies.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org