GitLab CI Runner artifacts size error: “too large archive”

As part of putting together a GitLab CI pipeline to build a Python deployment for an AWS Lambda, I ran into an issue with the size of the build dir that I’m zipping up ready for deployment:

Uploading artifacts...
./build: found 2543 matching files 
ERROR: Uploading artifacts to coordinator... too large archive id=181 responseStatus=413 Request Entity Too Large status=413 Request Entity Too Large token=rtRUzgtp
FATAL: Too large

Hmm. Ok. A quick search found this post which says there’s a setting to increase the max build artifact size – it’s under /admin/application_settings, in the Continuous Integration setting – looks like the default is 100MB, so let’s bump that up and try again:

Initial thoughts with a new 15″ 2015 Macbook Pro

My 15″ 2012 MacBook Pro started to get unreliable in the past couple of months, with random kernel panic reboots and the ominous “Your computer restarted because of an issue“. Looking in the Console app at the error logs, there were a number of common errors, mainly with the Intel HD graphics. It’s clear something was starting to fail, as having this MacBook Pro as my daily driver for 5 years I’d gone from not rebooting for months (I’d just sleep it over night), to having a random hang then reboot once every couple of weeks, and it started to get more frequent.

Long story short, upgrading to High Sierra was the first OS X or MacOS upgrade that I’d experienced a failure during the install (I’ve gone through 10.5 Leopard, through 10.12 Sierra). I had two disks in this MBP, one SSD and one HDD. Installing High Sierra to my SSD, apparently High Sierra upgrades SSDs by default to the new APFS file system, which is only supported on High Sierra, and apparently is not reversible back to HFS+. So I ended up with a 5 year old machine with a failed upgrade and would boot to a black screen with a spinning progress circle and not get any further. Booting from my second drive which had El Cap on it, it couldn’t see the now APFS drive, and then also started crashing on startup where previously was fine. i spent far too long trying to reinstall a fresh install of El Cap and Sierra and couldn’t get back to a stable place. Even when I did get El Cap cleanly installed, it would crash after a couple of minutes after logging on, so clearly the time had come for this 5 year old machine to be retired.

So, new 15″ 2015 Macbook Pro. Externally it looks very similar to the 2012, with a few minor differences:

  • It’s slightly smaller
  • It’s thiner
  • Noticeably lighter
  • The front cutaway section when you insert your thumb to open the screen is not as deep and doesn’t have edges as sharp (which I always thought was weird on the the 2012)

More significant changes:

  • The Retina screen is INCREDIBLE. I don’t think I’ve ever seen a screen that is so sharp. Text is incredibly sharp and clear in all apps, and the level of detail even in the stock background images is mindblowing
  • The keyboard style is noticeably different. The travel on the keys is much shorter and softer, even squidgy. At first I’d describe the feel as what my 2012 keyboard feels like now it’s well worn after 5 years of daily usage, but after a few days of using it, it feels good for typing, as with less resistance and travel, there’s less need to really mash the keys. I’m not sure if the 2015 has the new butterfly style keys, but either way, a very noticeable change
  • It runs cold to the touch, even after being on for a few hours (my 2012 would get warm, and even hot if you were doing something intensive like editing a video)

The single most impressive change that actually prompted me to write this short review is the new touchpad. I could not put my finger on (pun intended) what was different with the touchpad and how it felt. At first I thought it was similar to the shorter, lighter travel of the keys, in that maybe the travel of the touchpad when you click it had been reduced. I did a quick search to read about what had changed, and then it clicked (ha!). The haptic feedback from the touchpad really does feel like it’s clicking, but without the physical movement it feels a bit odd. I’m not sure at this point if it’s better than before, but it’s definitely interesting and a very clever approach. I understand this was a design change to allow the thiner/lighter MacBooks and MacBook Airs to be even thinner without a touchpad that physically moved. Anyway, it was a lightbulb moment when I read about the haptic feedback.

So far, very impressed and pleased with my new machine. I hope that this one too will last another 5 years 🙂

Loading the Yelp dataset into MongoDB

In a previous post, I downloaded the Yelp dataset, 5.79GB of json data. My first thought (before I get to experimenting with Apache Spark), was how can I extract some basic stats from this dataset, basics like how many data items are there, and what do the records look like in each of the data files.

Using mongoimport and referring to the docs here, the syntax for the import is:

mongoimport -d database -c collection importfile.json

Here’s the Yelp dataset json file for importing, to get an idea of the size of each file:

kev@esxi-ubuntu-mongodb1:~/data/yelp$ ls -lS

total 5657960

-rwxrwxr-x 1 kev kev 3819730722 Oct 14 16:16 review.json

-rwxrwxr-x 1 kev kev 1572537048 Oct 14 16:22 user.json

-rwxrwxr-x 1 kev kev  184892583 Oct 14 16:16 tip.json

-rwxrwxr-x 1 kev kev  132272455 Oct 14 16:03 business.json

-rwxrwxr-x 1 kev kev   60098185 Oct 14 16:03 checkin.json

-rwxrwxr-x 1 kev kev   24195971 Oct 14 16:03 photos.json

 

So importing each of the datasets, one at a time:

kev@esxi-ubuntu-mongodb1:~/data/yelp$ mongoimport -d yelp -c checkin checkin.json

2017-10-14T16:49:35.566-0700 connected to: localhost

2017-10-14T16:49:38.564-0700 [#########……………] yelp.checkin 22.6MB/57.3MB (39.5%)

2017-10-14T16:49:44.474-0700 [########################] yelp.checkin 57.3MB/57.3MB (100.0%)

2017-10-14T16:49:44.475-0700 imported 135148 documents

 

kev@esxi-ubuntu-mongodb1:~/data/yelp$ mongoimport -d yelp -c business business.json

2017-10-14T16:49:59.593-0700 connected to: localhost

2017-10-14T16:50:02.592-0700 [#####……………….] yelp.business 27.9MB/126MB (22.1%)

2017-10-14T16:50:12.873-0700 [########################] yelp.business 126MB/126MB (100.0%)

2017-10-14T16:50:12.873-0700 imported 156639 documents

 

kev@esxi-ubuntu-mongodb1:~/data/yelp$ mongoimport -d yelp -c tip tip.json

2017-10-14T16:50:38.061-0700 connected to: localhost

2017-10-14T16:50:41.058-0700 [##………………….] yelp.tip 17.5MB/176MB (9.9%)

2017-10-14T16:51:07.381-0700 [########################] yelp.tip 176MB/176MB (100.0%)

2017-10-14T16:51:07.381-0700 imported 1028802 documents

 

kev@esxi-ubuntu-mongodb1:~/data/yelp$ mongoimport -d yelp -c user user.json

2017-10-14T16:51:28.648-0700 connected to: localhost

2017-10-14T16:51:31.648-0700 [……………………] yelp.user 36.9MB/1.46GB (2.5%)

2017-10-14T16:54:15.907-0700 [########################] yelp.user 1.46GB/1.46GB (100.0%)

2017-10-14T16:54:15.907-0700 imported 1183362 documents

 

kev@esxi-ubuntu-mongodb1:~/data/yelp$ mongoimport -d yelp -c review review.json

2017-10-14T16:57:01.018-0700 connected to: localhost

2017-10-14T16:57:04.016-0700 [……………………] yelp.review 34.9MB/3.56GB (1.0%)

2017-10-14T17:02:31.967-0700 [########################] yelp.review 3.56GB/3.56GB (100.0%)

2017-10-14T17:02:31.967-0700 imported 4736897 documents

 

Done! Almost 6GB of data imported to MongoDB. Now, time for some queries!

Installing ESXi Guest Tools on CentOS 7

From here, edit /etc/yum.repos.d/vmware-tools.repo , add:

[vmware-tools]
name = VMware Tools
baseurl = http://packages.vmware.com/packages/rhel7/x86_64/
enabled = 1
gpgcheck = 1

To install:

sudo yum install open-vm-tools-deploypkg

On my freshly installed CentOS 7, this gave the error:

[kev@unknown000C2960F639 ~]$ sudo yum upgrade

Loaded plugins: fastestmirror

You have enabled checking of packages via GPG keys. This is a good thing. 

However, you do not have any GPG public keys installed. You need to download

the keys for packages you wish to install and install them.

You can do that by running the command:

    rpm --import public.gpg.key

Alternatively you can specify the url to the key you would like to use

for a repository in the 'gpgkey' option in a repository section and yum 

will install it for you.

For more information contact your distribution or package provider.

Problem repository: vmware-tools

It doesn’t say how to import the GPG keys, but this page mentions they are in this location:  /etc/pki/rpm-gpg

So to import,

sudo rpm --import  /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

Then I could update:

sudo yum update

Then install the vmware-tools:

sudo yum install open-vm-tools-deploypkg