{"id":389449,"date":"2022-01-04T17:48:53","date_gmt":"2022-01-04T14:48:53","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/"},"modified":"2022-01-04T17:48:53","modified_gmt":"2022-01-04T14:48:53","slug":"how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/","title":{"rendered":"#How to Configure Minio as a Shared Cache For GitLab CI \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a42ca1f910ff\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a42ca1f910ff\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Whats_The_Problem\" >What\u2019s The Problem?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Installing_Minio\" >Installing Minio<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Creating_a_Minio_Config_File\" >Creating a Minio Config File<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Configuring_Minio_for_GitLab\" >Configuring Minio for GitLab<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Configuring_GitLab_Runner\" >Configuring GitLab Runner<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Run_Your_CI_Jobs\" >Run Your CI Jobs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci-cloudsavvy-it\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Configure Minio as a Shared Cache For GitLab CI \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage aligncenter size-full wp-image-15000\" data-pagespeed-lazy-srcset=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ed8891a0.jpeg?width=398&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 400w, https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ed8891a0.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1 1200w\" sizes=\"auto, 400w, 1200w\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ed8891a0.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Graphic showing the Minio and GitLab logos\" width=\"1202\" height=\"677\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/min.io\">Minio<\/a> is a self-hosted object storage system that\u2019s compatible with the Amazon S3 API interfaces. In this guide, we\u2019ll use Minio to set up shared caching for GitLab Runner as an alternative to a cloud-hosted object storage solution.<\/p>\n<h2 id=\"whats-the-problem\"><span class=\"ez-toc-section\" id=\"Whats_The_Problem\"><\/span>What\u2019s The Problem?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>GitLab CI pipelines <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#cache\">support a <code>cache<\/code><\/a> to accelerate future runs. Caches are stored locally on each runner instance by default. You can use an object storage provider instead to enable \u201cshared\u201d cache mode.<\/p>\n<p>Shared caching ensures multiple jobs can access the cache simultaneously. Concurrent access isn\u2019t supported when you\u2019re using local caching with the Docker pipeline executor. This can cause reduced pipeline performance due to missed cache hits.<\/p>\n<p>Although the cache restoration is intended to be on a \u201cbest effort\u201d basis, meaning your jobs shouldn\u2019t <em>require<\/em> a cache include content from an earlier job, in practice <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-runner\/-\/issues\/1151\">many people do use the <code>cache<\/code> field<\/a> to pass data between their jobs. This doesn\u2019t currently work when you have multiple jobs that run in parallel and try to restore the same cache.<\/p>\n<p>Self-hosting a Minio installation alongside your GitLab instance lets you benefit from more reliable cache restoration that still works predictably with parallel jobs. Here\u2019s how to install Minio and configure GitLab Runner to use it for caching.<\/p>\n<h2 id=\"installing-minio\"><span class=\"ez-toc-section\" id=\"Installing_Minio\"><\/span>Installing Minio<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Minio Server can be <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/min.io\/download#\/linux\">downloaded as<\/a> a standalone binary or <code>.deb<\/code> and <code>.rpm<\/code> packages. We\u2019re focusing on the Debian package in this guide. If you use the binary directly, you\u2019ll need to manually add the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/github.com\/minio\/minio-service\">Minio service script<\/a> to your <code>init<\/code> implementation to make Minio start with your machine.<\/p>\n<p><a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">Download<\/a> and install Minio\u2019s <code>.deb<\/code> using the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/min.io\/download#\/linux\">instructions<\/a> on the website to get the latest version. This will add the Minio server to your system and register its service definition.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15001\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/9bf5f11f.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"606\" height=\"130\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Minio expects to execute as the <code>minio-user<\/code> user. Create this user account now:<\/p>\n<pre>sudo useradd -r minio-user -s \/sbin\/nologin<\/pre>\n<p>Next create a Minio data directory. All the files that are uploaded to your object store will be saved to this location. We\u2019re using <code>\/mnt\/minio<\/code> for the purposes of this tutorial. Use <code>chown<\/code> to give your <code>minio-user<\/code> ownership of the directory.<\/p>\n<pre>sudo mkdir -p \/mnt\/minio&#13;\nsudo chown -R minio-user:minio-user \/mnt\/minio&#13;\nsudo chmod -R 0775 \/mnt\/minio<\/pre>\n<h2 id=\"creating-a-minio-config-file\"><span class=\"ez-toc-section\" id=\"Creating_a_Minio_Config_File\"><\/span>Creating a Minio Config File<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Minio automatically loads config values from the <code>\/etc\/default\/minio<\/code> file. Create this file now and add the following content:<\/p>\n<pre>MINIO_ROOT_USER=\"minio\"&#13;\nMINIO_ROOT_PASSWORD=\"P@$$w0rd\"&#13;\nMINIO_OPTS=\"--address :9600 --console-address :9601\"&#13;\nMINIO_VOLUMES=\"\/mnt\/minio\"<\/pre>\n<p>The first two lines define credentials for Minio\u2019s initial root user. Change the password to a secure value.<\/p>\n<p>The <code>MINIO_OPTS<\/code> line provides Minio server settings. We\u2019re explicitly setting the listening port to <code>9600<\/code> (the default) and exposing Minio\u2019s web console on <code>9601<\/code>. The <code>MINIO_VOLUMES<\/code> directive defines where Minio will store your data. This is set to the directory set up earlier.<\/p>\n<p>Change the ownership of your config file to <code>minio-user<\/code> next. Minio might fail to start if the ownership\u2019s incorrect:<\/p>\n<pre>sudo chown minio-user:minio-user \/etc\/default\/minio<\/pre>\n<p>Start the Minio service and access the web console in your browser at <code>localhost:9601<\/code>. Use your root user credentials to login.<\/p>\n<pre>sudo service minio start<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15002\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/1fc3b533.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"940\" height=\"326\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"configuring-minio-for-gitlab\"><span class=\"ez-toc-section\" id=\"Configuring_Minio_for_GitLab\"><\/span>Configuring Minio for GitLab<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The next step is creating a bucket for GitLab to upload pipeline caches to. Click the \u201cBuckets\u201d link in the Minio Console sidebar, then the blue \u201cCreate Bucket\u201d button in the top-right.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15012\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/829105b8.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1278\" height=\"646\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Give your bucket a name and click the \u201cCreate Bucket\u201d button in the bottom-right. None of the offered features will be available in this simplistic Minio installation using a single local disk. They\u2019re not needed as the bucket content will be managed by GitLab Runner.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15013\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/bf7a43ef.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1278\" height=\"646\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Once you\u2019ve created your bucket, head to the Minio Console\u2019s \u201cUsers\u201d page. Click \u201cCreate User\u201d to add a user account for GitLab Runner. While not strictly required, this is a best practice step so you don\u2019t need to supply GitLab with your root user credentials.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15014\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/456b89fa.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1278\" height=\"646\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Type a username, such as <code>gitlab<\/code>, into the \u201cAccess Key\u201d field. Supply a secure password to the \u201cSecret Key\u201d field. Assign the new user the <code>readwrite<\/code> policy from the list, then click the \u201cSave\u201d button. GitLab requires read-write access so it can upload and retrieve your cached data.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15015\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/3258ef22.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1280\" height=\"648\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"configuring-gitlab-runner\"><span class=\"ez-toc-section\" id=\"Configuring_GitLab_Runner\"><\/span>Configuring GitLab Runner<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now you can integrate Minio into GitLab Runner. Open your GitLab Runner config file; this is usually found at <code>\/etc\/gitlab-runner\/config.toml<\/code> for GitLab omnibus installations.<\/p>\n<p>Find the <code>[runners.cache]<\/code> section and add the following lines:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"toml\">\n<pre class=\"de1\">[runners.cache]&#13;\n  Type = \"s3\"&#13;\n  Shared = true&#13;\n  [runners.cache.s3]&#13;\n    AccessKey = \"gitlab\"&#13;\n    SecretKey = \"P@$$w0rd\"&#13;\n    BucketName = \"gitlab\"&#13;\n    Insecure = true&#13;\n    ServerAddress = \"192.168.0.1:9600\"<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Here\u2019s the effect of these values:<\/p>\n<ul>\n<li><strong><code>Type<\/code><\/strong> \u2013 Informs GitLab that an S3-like storage engine is to be used.<\/li>\n<li><strong><code>Shared<\/code><\/strong> \u2013 Enables the cache to be shared across concurrent jobs.<\/li>\n<li><strong><code>AccessKey<\/code> and <code>SecretKey<\/code><\/strong> \u2013 These should match the credentials for the Minio user account you created in the Minio Console.<\/li>\n<li><strong><code>BucketName<\/code><\/strong> \u2013 Change this to the name of the bucket you created in the Minio Console.<\/li>\n<li><strong><code>Insecure<\/code><\/strong> \u2013 Enables GitLab to access Minio over plain HTTP. If you\u2019ll be using your Minio server for additional purposes, you should follow the docs to <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/docs.min.io\/docs\/how-to-secure-access-to-minio-server-with-tls.html\">set up HTTPS<\/a> for your installation.<\/li>\n<li><strong><code>ServerAddress<\/code><\/strong> \u2013 Add your server\u2019s IP address here. This informs GitLab of the S3 server\u2019s connection details.<\/li>\n<\/ul>\n<p>Restart the GitLab Runner service to ensure your changes take effect:<\/p>\n<pre>sudo gitlab-runner restart<\/pre>\n<h2 id=\"run-your-ci-jobs\"><span class=\"ez-toc-section\" id=\"Run_Your_CI_Jobs\"><\/span>Run Your CI Jobs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Your CI jobs should now pull and push caches defined in your <code>.gitlab-ci.yml<\/code> up to your Minio server. This enables use of shared caches that can be accessed painlessly by parallel jobs.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15003\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/b0a7f4b0.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"704\" height=\"180\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>When everything\u2019s working, you\u2019ll see an <code>Uploading cache.zip<\/code> line in your CI job logs that demonstrates GitLab\u2019s using your object storage server. Subsequent jobs that reference the cache should include <code>cache.zip is up to date<\/code> and <code>successfully extracted cache<\/code> near the top of the log.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15004\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ca481f76.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"443\" height=\"124\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You can browse currently stored caches by inspecting your bucket in the Minio Console. This also gives you a convenient way to check disk utilization and delete old caches to free up space. GitLab creates a directory for each of your project IDs. Within that folder you\u2019ll find ZIP archives containing your caches, each one named by branch and the cache name given in your <code>.gitlab-ci.yml<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15010\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/b91a11c4.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1282\" height=\"650\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Minio is easily configured as a basic installation that works as a shared cache for GitLab Runner. This ensures the cache is used reliably when multiple jobs run concurrently. It\u2019s a worthwhile addition to your self-hosted GitLab installation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15009\" data-pagespeed-lazy-src=\"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/924f78be.png?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"\" width=\"1280\" height=\"648\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>While in many cases shared caching will improve performance, beware this may not be universally true. It adds additional overheads to the pipeline process as GitLab Runner needs to compress your job\u2019s cache and upload it to Minio before recording a successful result. When a later job restores the cache, the ZIP will need to be pulled from Minio and decompressed before your script can begin. It\u2019s worth monitoring your own pipelines after switching to object storage to check you\u2019re getting the results you expected.\n<\/p><\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/14999\/how-to-configure-minio-as-a-shared-cache-for-gitlab-ci\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Configure Minio as a Shared Cache For GitLab CI \u2013 CloudSavvy IT&#8221; Minio is a self-hosted object storage system that\u2019s compatible with the Amazon S3 API interfaces. In this guide, we\u2019ll use Minio to set up shared caching for GitLab Runner as an alternative to a cloud-hosted object storage solution. What\u2019s The Problem?&#8230;<\/p>\n","protected":false},"author":1,"featured_media":389450,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2021\/12\/ed8891a0.jpeg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-389449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/389449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=389449"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/389449\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/389450"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=389449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=389449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=389449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}