Mac M1 Builds
tags:
01 Jul 2022 05:57
Setup Mac
- Get an M1 mac (via scaleway)
- Connect via VNC over SSH
- Install Docker Desktop
Setup Docker Hub account
- Log in to Docker Hub
- Generate access token. Copy to clipboard
Docker commands:
# Build:
$ docker buildx build --tag gabrys/elasticsearch:6.8 .
# Log in to Docker Hub:
$ security -v unlock-keychain ~/Library/Keychains/login.keychain-db
$ docker login -u gabrys
$ docker buildx create --use
# Build and push:
$ docker buildx build --platform linux/arm64/v8,linux/amd64 --push --tag gabrys/elasticsearch:6.8 .
Comments: 0
Closing svn2github
tags: svn2github
13 Jan 2019 18:06
Almost exactly one year ago, I was planning to spend some more time on svn2github, (see svn2github: Next Steps).
Unfortunately, I never delivered on that promise, and to put it as directly as I can, I need to close the project altogether. (Please continue reading if you're interested in doing a similar thing yourself!)
History
svn2github has been up since 2011/2012 (based on whois data). That's been 7 years already! What started a little side project, stayed exactly that. I kept it running, because I've seen people use it. I'm extremely happy I could help, but this time has come to an end.
I created svn2github back in 2011 to help my team at Allegro deal with SVN dependencies to our Git project. We wanted to use Git for our PHP application and Git submodules for our dependencies, but at that point in time many mainstream projects were still using SVN. Then out of a weekend of quick Python coding, svn2github was born!
7 years later and most programmers don't know what SVN is anymore :-). Most projects are either hosted in Git or Mercurial with big corporations backing them (Microsoft, Facebook). Also it looks like git submodules didn't catch on and language-specific dependency management is used instead (npm for JS, composer for PHP, etc). I don't think anyone will miss svn2github, but if you will, please leave me a comment, I will gladly share some information on how to build a service like svn2github. Let me remind you it was born in one weekend!
Stats
Through the 7 years of operation, its users mirrored about 1300+ SVN repositories to GitHub. My single server running the project was down a few times due to not scaling properly when mirroring HUGE repos (that I needed to disable at some point to continue operating). After removing the HUGE repos, the repos mirrored to GitHub currently take about 200GB.
Plan forward
13 January 2019: This note posted
20 January 2019: Disable automatically updating the repos (can still add more repos, but this will be a one-time import operation)
27 January 2019: Disable adding new repos
I'm not going to remove repos from GitHub (unless someone requests it due to legal issues, etc).
Next steps
The biggest challenge running the project was making sure all of the 1,000+ repos are actually mirrored. If you have just one or two repos to look after, your job is much easier, in fact I created a little helper script to help you do just that. Please check the simplified "just one repo" host-yourself version of svn2github at this link: https://github.com/gabrys/svn2github
Thank you!
Thank you all for using the service. If you want to contact me, please leave me a direct message on Wikidot, or send me an email, or leave a comment.
Comments: 9
svn2github: Next Steps
tags: svn2github
10 Jan 2018 04:24
I'd like to invest a bit of time in http://svn2github.com/ . I'd like to do the following things:
- Add more transparency in the "add" queue and process — i.e. you should be able to see more than just "Queued" when you add a repo to be mirrored.
- Add some end-to-end tests. Should be easy to do, given how limited the functionality is
- Add a status page: showing results of the tests above, number of repos cloned, average mirror latency, last sync time, etc
- Add Monaro mining on the add page. Mine some money for me while waiting to get your repo cloned (I'd rather do this than ads)
- Change the syncing mechanism: currently it's mostly random, i.e. your repo might be updated every few hours or days depending on your luck. I'd like to weigh how often a repo is updated given how it is (sync smaller/faster repos more often) and whether it generally succeeds or not (if a repo doesn't sync once, increase the interval for it, so other repos can be at benefit).
Comments: 3
Centos Chroot
tags: centos chroot linux
12 Dec 2017 19:49
Let's say you want a chroot with CentOS with an older version of the system to test something.
Get the minimal root fs
- Check out Docker images for CentOS: https://hub.docker.com/_/centos/
- Follow the Dockerfile link for the version you're interested in, say 6.6: https://github.com/CentOS/sig-cloud-instance-images/blob/8911843d9a6cc71aadd81e491f94618aded94f30/docker/Dockerfile
- Go one level up in GitHub and locate the centos-*.tar.xz file, it's the archive with the mininal rootfs for CentOS: https://github.com/CentOS/sig-cloud-instance-images/blob/8911843d9a6cc71aadd81e491f94618aded94f30/docker/centos-6.6-20150304_1234-docker.tar.xz
- Click the download link
Prepare a directory, unpack the root fs
sudo mkdir -p /mnt/centos-chroot/
# You may need to uncompress the XZ file, but my tar could deal with it, so try yourself:
sudo tar -xf /path/to/centos-6.6-20150304_1234-docker.tar.xz
# Mount some pseudo filesystems:
cd /mnt/centos-chroot/
sudo mount --bind /sys sys
sudo mount --bind /dev dev
sudo mount -t proc proc proc
Enter your precious chroot:
sudo chroot /mnt/centos-chroot/ /bin/bash
. /etc/environment
Done!