<div dir="ltr">Hi Martin,<div><br></div><div>Thank you for that.</div><div>A few remarks and questions:</div><div>- how much time does the "docker build" step takes? We can possibly speed things up by push images to the dockerhub, as they don't need to change very often.</div><div>- any reason why you clone pkg-varnish-cache in each job? The idea was to have it cloned once in tar-pkg-tools for consistency and reproducibility, which we lose here.</div><div>- do we want to change things for the amd64 platforms for the sake of consistency?</div><div><br><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 23, 2020 at 6:25 AM Martin Grigorov <<a href="mailto:martin.grigorov@gmail.com">martin.grigorov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi,<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 18, 2020 at 5:31 PM Martin Grigorov <<a href="mailto:martin.grigorov@gmail.com" target="_blank">martin.grigorov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 12, 2020 at 4:35 PM Martin Grigorov <<a href="mailto:martin.grigorov@gmail.com" target="_blank">martin.grigorov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Guillaume,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 12, 2020 at 3:23 PM Guillaume Quintard <<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Offering arm64 packages requires a few things:</div><div>- arm64-compatible code (all good in <a href="https://github.com/varnishcache/varnish-cache" target="_blank">https://github.com/varnishcache/varnish-cache</a>)</div><div>- arm64-compatible package framework (all good in <a href="https://github.com/varnishcache/pkg-varnish-cache" target="_blank">https://github.com/varnishcache/pkg-varnish-cache</a>)</div><div>- infrastructure to build the packages (uhoh, see below)</div><div>- infrastructure to store and deliver (<a href="https://packagecloud.io/varnishcache" target="_blank">https://packagecloud.io/varnishcache</a>)</div><div><br></div><div>So, everything is in place, expect for the third point. At the moment, there are two concurrent CI implementations:</div><div>- travis: <a href="https://github.com/varnishcache/varnish-cache/blob/master/.travis.yml" target="_blank">https://github.com/varnishcache/varnish-cache/blob/master/.travis.yml</a> It's the historical one, and currently only runs compilation+test for OSX</div></div></div></blockquote><div><br></div><div>Actually it tests Linux AMD64 and ARM64 too.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>- circleci: <a href="https://github.com/varnishcache/varnish-cache/blob/master/.circleci/config.yml" target="_blank">https://github.com/varnishcache/varnish-cache/blob/master/.circleci/config.yml</a> the new kid on the block, that builds all the packages and distchecks for all the packaged platforms</div><div><br></div><div>The issue is that cirecleci doesn't support arm64 containers (for now?), so we would need to re-implement the packaging logic in Travis. It's not a big problem, but it's currently not a priority on my side.</div><div><br></div><div>However, I am totally ready to provide help if someone wants to take that up. The added benefit it that Travis would be able to handle everything and we can retire the circleci experiment</div></div></div></blockquote><div><br></div><div>I will take a look in the coming days and ask you if I need help!</div></div></div></blockquote><div><br></div><div>I've took a look at the current setup and here is what I've found as problems and possible solutions:</div><div><br></div><div>1) Circle CI</div><div>1.1) problem - the 'machine' and 'Docker' executors run on x86_64, so there is no way to build the packages in a "native" environment</div><div>1.2) possible solutions</div><div>1.2.1) use multiarch cross build</div><div>1.2.2) use 'machine' executor that registers QEMU via <a href="https://hub.docker.com/r/multiarch/qemu-user-static/" target="_blank">https://hub.docker.com/r/multiarch/qemu-user-static/</a> and then builds and runs a custom Docker image that executes a shell script with the build steps</div><div>It will look something like <a href="https://github.com/yukimochi-containers/alpine-vpnserver/blob/69bb0a612c9df3e4ba78064d114751b760f0df9d/.circleci/config.yml#L19-L38" target="_blank">https://github.com/yukimochi-containers/alpine-vpnserver/blob/69bb0a612c9df3e4ba78064d114751b760f0df9d/.circleci/config.yml#L19-L38</a> but instead of uploading the Docker image as a last step it will run it.</div><div>The RPM and DEB build related code from current config.yml will be extracted into shell scripts which will be copied in the custom Docker images </div><div><br></div><div>From these two possible ways I have better picture in my head how to do 1.2.2, but I don't mind going deep in 1.2.1 if this is what you'd prefer.</div></div></div></blockquote><div><br></div><div>I've decided to stay with Circle CI and use 'machine' executor with QEMU.</div><div><br></div><div>The changed config.yml could be seen at <a href="https://github.com/martin-g/varnish-cache/tree/feature/aarch64-packages/.circleci" target="_blank">https://github.com/martin-g/varnish-cache/tree/feature/aarch64-packages/.circleci</a> and the build at <a href="https://app.circleci.com/pipelines/github/martin-g/varnish-cache/71/workflows/3a275d79-62a9-48b4-9aef-1585de1c87c8" target="_blank">https://app.circleci.com/pipelines/github/martin-g/varnish-cache/71/workflows/3a275d79-62a9-48b4-9aef-1585de1c87c8</a></div><div>The builds on x86 arch take 3-4 mins, but for aarch64 (emulation!) ~40mins</div><div>For now the jobs just build the .deb & .rpm packages for CentOS 7 and Ubuntu 18.04, both amd64 and aarch64. </div><div>TODOs:</div><div>- migrate Alpine</div><div>- store the packages as CircleCI artifacts</div><div>- anything else that is still missing</div><div><br></div><div>Adding more architectures would be as easy as adding a new Dockerfile with a base image from the respective type.</div><div><br></div><div>Martin</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>2) Travis CI</div><div>2.1) problems</div><div>2.1.1) generally Travis is slower than Circle! </div><div>Althought if we use CircleCI 'machine' executor it will be slower than the current 'Docker' executor!</div><div>2.1.2) Travis supports only Ubuntu</div><div>Current setup at CircleCI uses CentOS 7.</div><div>I guess the build steps won't have problems on Ubuntu.</div><div><br></div><div>3) GitHub Actions</div><div>GH Actions does not support ARM64 but it supports self hosted ARM64 runners</div><div>3.1) The problem is that there is no way to make a self hosted runner really private. I.e. if someone forks Varnish Cache any commit in the fork will trigger builds on the arm64 node. There is no way to reserve the runner only for commits against</div><div><a href="https://github.com/varnishcache/varnish-cache" target="_blank">https://github.com/varnishcache/varnish-cache</a><br></div><div><br></div><div>Do you see other problems or maybe different ways ?</div><div>Do you have preferences which way to go ?</div><div><br></div><div>Regards,</div><div>Martin</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>Regards,</div><div>Martin</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><br></div><div><div><div dir="ltr"><div dir="ltr"><div>-- <br></div>Guillaume Quintard</div></div></div></div></div></div>
_______________________________________________<br>
varnish-dev mailing list<br>
<a href="mailto:varnish-dev@varnish-cache.org" target="_blank">varnish-dev@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev</a><br>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>