<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dan McKinney</title>
    <description>The latest articles on Forem by Dan McKinney (@dan_mckinney3).</description>
    <link>https://forem.com/dan_mckinney3</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F335162%2F2418e5bd-2a90-4b3a-b1fb-f8e837e64593.jpg</url>
      <title>Forem: Dan McKinney</title>
      <link>https://forem.com/dan_mckinney3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dan_mckinney3"/>
    <language>en</language>
    <item>
      <title>Caching and Upstream Proxying for RedHat Packages</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Wed, 25 Nov 2020 13:54:14 +0000</pubDate>
      <link>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-redhat-packages-4lbg</link>
      <guid>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-redhat-packages-4lbg</guid>
      <description>&lt;p&gt;In keeping with our vision of offering a universal feature set across all the package formats we support, we are delighted to announce that we are now offering configurable upstream proxying and caching support for RedHat packages.&lt;/p&gt;

&lt;p&gt;As we touched upon when announcing the same for Debian and Maven packages, there are a lot of reasons why this is a really &lt;a href="https://cloudsmith.com/blog/caching-and-upstream-proxying-for-debian-packages/" rel="noopener noreferrer"&gt;good thing&lt;/a&gt;, so instead of going over those again, let’s jump straight into how you can set this up in you Cloudsmith repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started.
&lt;/h2&gt;

&lt;p&gt;We don’t think that we could have made this much easier to configure (but, of course, we would love to hear &lt;a href="https://help.cloudsmith.io/docs/contact-us" rel="noopener noreferrer"&gt;your thoughts&lt;/a&gt; on this!)&lt;/p&gt;

&lt;p&gt;In your Cloudsmith repository, you’ll see a menu item called “Upstream Proxying”. This is where we will configure our upstreams. Simply click the “Create Upstreams” button and select “RedHat” to create a new RedHat upstream:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl3nj0n8tynmaz2t4zpc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fl3nj0n8tynmaz2t4zpc3.png" alt="Create an Upstream" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will then see the “Create RedHat Upstream” form:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe6n8mkp80npywar05e5c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe6n8mkp80npywar05e5c.png" alt="Create Upstream Form" width="497" height="745"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You just need to add a Name for the upstream, the upstream URL, and a priority weighting – If you have multiple upstreams this will determine the order in which they are used.  &lt;/p&gt;

&lt;p&gt;We can choose to fetch and cache any requested package (instead of just fetching them), and to verify the SSL certificates provided by the upstream. Then, we select the individual distribution for this upstream.&lt;/p&gt;

&lt;p&gt;Optionally - we can also add a GPG key, if required, for package signing, authentication headers for private repositories that require authentication and also some arbitrary headers if you wish to send something custom along with your request.&lt;/p&gt;

&lt;p&gt;And that’s it, we have now added a new Redhat upstream to our Cloudsmith repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0blz7jfo3dbvzl9tu49c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0blz7jfo3dbvzl9tu49c.png" alt="Upstream Created" width="800" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now, the next request for a package that isn’t present in this repository will be passed through to the upstream and the package fetched it if it is available there.  If you also enabled “fetch and cache”, the package will be cached in your Cloudsmith repo for any future requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;By adding Redhat upstream proxying and caching, we are moving forwards towards our goal of being the most universal package management solution for your development, deployment and distribution workflows. We would love you to join us on this journey, and we are very excited about the platform we have built, the service that we provide, and where we are going to next. Sign up for free today, and experience Cloudsmith for yourself!&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>proxying</category>
      <category>caching</category>
    </item>
    <item>
      <title>Did We Lose Something With The Adoption Of Containers? And Can We Get It Back?</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 13 Oct 2020 10:36:05 +0000</pubDate>
      <link>https://forem.com/cloudsmith/did-we-lose-something-with-the-adoption-of-containers-and-can-we-get-it-back-mhi</link>
      <guid>https://forem.com/cloudsmith/did-we-lose-something-with-the-adoption-of-containers-and-can-we-get-it-back-mhi</guid>
      <description>&lt;p&gt;The subject of containers probably doesn’t need much of an introduction. Since the launch of Docker in 2013 containers have become almost ubiquitous, with &lt;a href="https://www.aquasec.com/news/portworx-container-adoption-survey/" rel="noopener noreferrer"&gt;89% of IT Professionals&lt;/a&gt; confirming their organizations used containers in some way during 2019.&lt;/p&gt;

&lt;p&gt;That is no surprise. Docker itself calls the container “a standardized unit of software”, which is a nice way of saying that a typical container packages up all the relevant code, system tools, dependencies and libraries within an application, and effectively isolates that application from the rest of the environment and infrastructure.&lt;/p&gt;

&lt;p&gt;As a result, containers have one great merit: they will reliably run, and run in the same way, wherever they are deployed. At a stroke, they eliminate the “well it’s working on my machine” problem that has caused endless heartache for both development and operations teams over the decades.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That benefit should not be under-estimated&lt;/strong&gt;. For developers, in particular, it is rather wonderful to be able to put everything into a container and throw it over the wall knowing that it is going to deploy, and in turn knowing that it isn’t going to come back over the same wall for round 2.&lt;/p&gt;

&lt;p&gt;It’s also - at least in theory - good for the operations team as well, for all of the same sorts of reasons.&lt;/p&gt;

&lt;p&gt;But it isn’t all good news.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is A “Unit” Of Software, Really?
&lt;/h2&gt;

&lt;p&gt;Prompted by the Docker definition of container I mentioned above, it might be instructive to ask ourselves whether the container is either the only, or indeed the best, ‘unit’ of software.&lt;/p&gt;

&lt;p&gt;If we take a 10,000 ft view of the history of software development it probably looks something like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The entirety of the source code is the unit&lt;/li&gt;
&lt;li&gt;The package is the unit&lt;/li&gt;
&lt;li&gt;The container is the unit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the old days of source code, you really had to be on top of things. The whole thing stood up or fell over as a whole, and things were pretty painful and expensive if (when) it did the latter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When the package became the unit, things improved&lt;/strong&gt;. Certainly, if we were following good package management and distribution best practices, then in most cases things fell over less and were easier to fix when they did. I’ll talk more about this later, but let’s also remember that packages also help speed up development full stop as they enable us to more easily re-use code and services.&lt;/p&gt;

&lt;p&gt;In the move to containerization, the third stage in our evolution, the ‘unit’ of software has got bigger. As it has done so, it has concealed complexity in order to enable that crucial isolation from the environment it runs.&lt;/p&gt;

&lt;p&gt;Essentially, the container runs as a kind of black box. The operations team just need to know what it does. They don’t need more detailed metadata and they don’t need to know what is inside it. After all, it’s all one self-contained package. So the unit of software has not only got bigger, it has also become less transparent.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem With Being Big And Opaque
&lt;/h2&gt;

&lt;p&gt;The problem with a large unit size is that within it are likely to be hundreds if not thousands of dependencies.&lt;/p&gt;

&lt;p&gt;And the problem with being opaque is that we don’t know what they are.&lt;/p&gt;

&lt;p&gt;What happens when something goes wrong? Let’s imagine (and this won’t take too much effort for veterans of &lt;a href="https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/" rel="noopener noreferrer"&gt;LeftPad&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Heartbleed" rel="noopener noreferrer"&gt;HeartBleed&lt;/a&gt;, &lt;a href="https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident" rel="noopener noreferrer"&gt;Event-Stream&lt;/a&gt; or one of any number of dependency related screw-ups) that a vulnerability is discovered within a certain package.&lt;/p&gt;

&lt;p&gt;Where is that package currently in use in our ecosystem? We don’t know. Can we quickly roll that package back to a known ‘safe’ version wherever necessary? No.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containers - as a ‘unit’ of software - live or die as a whole&lt;/strong&gt;. If something is wrong or might be wrong, we have no option other than to spin up a new version and redeploy: not necessarily a simple task. And as we don’t necessarily know which containers are affected, we find ourselves struggling to get on top of an emerging security crisis based on limited data. Not a nice place to be.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Lost Art Of Package Management
&lt;/h2&gt;

&lt;p&gt;My last point is this: that containerization has led to a general decline in diligence and observance of best practices when it comes to handling packages and dependencies. After all, if I am going to throw them all into one container and check if it runs does it really matter where I get packages from?&lt;/p&gt;

&lt;p&gt;The short answer is yes.&lt;/p&gt;

&lt;p&gt;The longer answer is yes because if we aren’t going to be sure what is in any given container further down the line, we should be as careful as we possibly can be that nothing we can’t stand over sneaks in now.&lt;/p&gt;

&lt;p&gt;Unfortunately, that doesn’t always happen. The path of least resistance is to get dependencies from pretty much anywhere and live with the consequences later. And as the developer cares about speed, and the ops team will be the ones dealing with those consequences, there is all the more reason to cut corners.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;As developers, we need to get back to being diligent - and consistently diligent - about questions of security, provenance, reliability and availability when it comes to packages and dependencies&lt;/strong&gt;. We need to be as sure as we can be that what we integrate into our projects (whether destined for containers or not) is what it says it is. And we need to know what we used where and when - so that we can fall back to a previous version quickly and easily if necessary.&lt;/p&gt;

&lt;p&gt;It’s the least our colleagues in operations, and the users of our end product, deserve.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>containers</category>
    </item>
    <item>
      <title>Universal Package Tagging</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 22 Sep 2020 10:55:53 +0000</pubDate>
      <link>https://forem.com/cloudsmith/universal-package-tagging-3412</link>
      <guid>https://forem.com/cloudsmith/universal-package-tagging-3412</guid>
      <description>&lt;p&gt;A key factor in good package management is organization. How you organize and structure your repositories will help you to unlock the efficiencies and promises of modern DevOps processes.&lt;/p&gt;

&lt;p&gt;There are, of course, a multitude of ways you can organize packages. You can group by version numbers, formats, architectures, filetype and more. At Cloudsmith we have supported this by extracting as much of this metadata as possible when you upload a package and making this metadata available for searching/filtering. &lt;/p&gt;

&lt;p&gt;Sometimes, however, the metadata just wasn’t granular enough – or it didn’t provide quite the nomenclature that you may have wanted. You wanted more.  And we are extremely pleased to say that we have now added a new feature that greatly expands upon this functionality. Presenting:&lt;/p&gt;

&lt;h2&gt;
  
  
  UNIVERSAL PACKAGE TAGGING
&lt;/h2&gt;

&lt;p&gt;So, what is new about this? And why does it matter?&lt;/p&gt;

&lt;p&gt;Well, in short, we now give you the ability to add ANY custom tags to ANY package or container, either during package upload or after the fact. And you can do this via the Cloudsmith CLI or the Cloudsmith API.&lt;/p&gt;

&lt;p&gt;Let’s say for example that you were using Cloudsmith to distribute your packages to end-users, and you have “Free” and “Premium” editions of your package. Well now you can simply add “Free” and “Premium” tags to the respective packages, and then create &lt;a href="https://help.cloudsmith.io/docs/entitlements" rel="noopener noreferrer"&gt;Entitlement Tokens&lt;/a&gt; to give your users access to just the packages they should be allowed – without resorting to adding the edition into the filename or creating two separate repositories. You can manage it all from one central location. And of course, as Cloudsmith repositories are fully multi-tenant for package formats, you can apply these tags across all the package formats you use, all in one repository.&lt;/p&gt;

&lt;p&gt;Or perhaps you would like to tag a package based on where it is deployed. You could tag a package as “rest-api”, or similar, to differentiate where in your production application the package is used.&lt;/p&gt;

&lt;p&gt;Let’s look at an example&lt;/p&gt;

&lt;p&gt;Let’s start off by listing the packages in our demo repo. The CLI command for this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cloudsmith list packages OWNER/REPOSITORY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkf5lcc1z9mxuich2etu2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkf5lcc1z9mxuich2etu2.png" alt="list packages" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, we can see that we have a collection of RPM packages in this repo, with various different versions.  Let’s check one of those packages to see if it has any custom tags attached. The CLI command for this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cloudsmith tags list OWNER/REPOSITORY/PACKAGE-IDENTIFIER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcbhfp7lvwl2cpj27ehne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcbhfp7lvwl2cpj27ehne.png" alt="list package by identifier" width="800" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK, this package does not have any custom tags. Let’s now add one, and the CLI command for adding a tag is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cloudsmith tags add OWNER/REPOSITORY/PACKAGE-IDENTIFIER tag1, tag2, tag3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffncm1q3pq5fil1se7921.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffncm1q3pq5fil1se7921.png" alt="adding a tag" width="800" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great, we have now added a custom tag “free” to this package.  We can repeat this for the other packages in the repository, varying the tags to suit our purpose. In addition, we can also specify that tags are “Immutable”, which means they can only be removed or altered by someone with Administrator permissions on the repository, or by the package owner.  When we are finished adding tags, we can look at the repository on the Cloudsmith website:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe3hylitqv69gytxgrx2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe3hylitqv69gytxgrx2t.png" alt="tags in repository" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see the new custom tags listed for each package alongside the tags that were automatically created from the metadata when the packages were processed after upload. We can now use these custom tags in any searching/filtering we need to do, or add them as a restriction on an Entitlement Tokens that we create for the repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foc3n6eqc1osxqxiueokp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foc3n6eqc1osxqxiueokp.png" alt="search by tag" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The syntax for searching/filtering is the same syntax you use when creating a search-based restriction for an Entitlement Token, so it really is easy to create a set of access tokens that divide the repository up into subsets of packages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Visibility of the attributes of your packages is important, it will help you not only structure your repositories but can also help you gain insight on what package is where or what package a group of customers can access. And it’s not just the basic attributes of a package that you need visibility on, it’s anything about a package that matters to your organization and workflows. With universal package tagging, you now have the ability to add your own searchable attributes to your packages, so you can define what is of importance.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
    </item>
    <item>
      <title>Caching and Upstream Proxying for Debian Packages</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 15 Sep 2020 19:57:32 +0000</pubDate>
      <link>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-debian-packages-410g</link>
      <guid>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-debian-packages-410g</guid>
      <description>&lt;p&gt;At Cloudsmith, we want to be your “one central source of truth” for your dependencies and package management needs. And in keeping with this ideal, we are extremely pleased to announce that we have added fully configurable transparent Proxying and Caching support for Debian packages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does this matter?
&lt;/h2&gt;

&lt;p&gt;Well, in short, it means that you can now use your private Cloudsmith repository for all of your Debian package needs – whether that is your own private packages or packages that you need from public upstream sources.  Your private Cloudsmith repository is all that you need to handle both. &lt;/p&gt;

&lt;p&gt;If you request a package from your Cloudsmith repository, and that package isn’t present in the repo, then Cloudsmith will automatically check any upstream repos that you have configured and will then fetch (and optionally cache the package for future requests) from the upstream.&lt;/p&gt;

&lt;p&gt;This brings you several important benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easier setup&lt;/strong&gt;. Your Cloudsmith repository is the only repository you need to configure on your clients. No more need to configure multiple repos, and handle multiple authentication credentials etc. Configure the upstreams once in Cloudsmith, and that’s it done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation&lt;/strong&gt;. If you have cached packages and dependencies that you require in your Cloudsmith repository, then if the upstream repo goes down, is otherwise unavailable, or if the packages are removed then you can still access your cached versions. No more breaking of build or deployment process due to an unreliable upstream.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visibility&lt;/strong&gt;. You can view details on what specific packages were requested from the upstreams. Gain insights into what you have, and what’s missing – or who and what else you are currently relying on. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;. Cloudsmith repositories are backed by a performant, global CDN. This means that your own packages and those cached from an upstream are delivered with the same low latencies and speeds. Going further than this, with edge nodes in almost all geographic regions, your users will experience this performance wherever they are located. Distributed teams all benefit equally.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security and Control&lt;/strong&gt;. All of your packages and dependencies in one place means it’s easier for you to implement the controls and security policies that you need. Multiple sources mean multiple management tasks. Keep everything in one place and keep a tighter hold on what you have.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sounds Great!. How do we set this up?.
&lt;/h2&gt;

&lt;p&gt;Well, it’s easy. In your Cloudsmith repository, you’ll see a menu item called “Upstream Proxying”. This is where we will configure our upstreams. Simply click the “Create Upstreams” button and select “Debian” to create a new Debian upstream:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5l43df2e4eqz5tai2w6o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5l43df2e4eqz5tai2w6o.png" alt="Create a Debian Upstream" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You are then presented with the “Edit Debian Upstream” form.  This is where we enter the details of the Debian upstream we wish to use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2adept6endro0t7ex26u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2adept6endro0t7ex26u.png" alt="Debian Upstream Form" width="424" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We add a Name for the upstream, it’s URL and a priority weighting- in cases of multiple upstreams this will determine the order in which they are checked for a package.&lt;/p&gt;

&lt;p&gt;We can then choose to fetch and cache any requested package (instead of just fetching them), and to verify the SSL certificates provided by the upstream. In addition, we can choose to enable this upstream for source packages too.  &lt;/p&gt;

&lt;p&gt;Next, we select the distributions and architectures that we wish to use this upstream for, and finally, we can add optional authentication headers (for private repositories that require authentication) and also optional arbitrary headers, if you wish to send something custom along with your request.&lt;/p&gt;

&lt;p&gt;And that’s it, we have now added a new Debian upstream to our Cloudsmith repository.&lt;/p&gt;

&lt;p&gt;Behind the scenes, Cloudsmith will now start to index the packages available in the upstream repository.  The upstream will be ready for use as soon as the indexing is complete.&lt;/p&gt;

&lt;p&gt;So now, for the next request for a package that isn’t present in this repository, Cloudsmith will check the upstream and fetch it if it is available there and also cache it in the Cloudsmith repo (if you enabled caching) for future requests. It’s that simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Debian upstream proxying and caching support is just another step on our path to providing you with the centralized controls, security, management and visibility that you need to enable a modern, high-velocity and DevOps-first workflow for your package management needs. It means fewer things to worry about, less exposure to change and most importantly.... &lt;/p&gt;

&lt;p&gt;Well, what's most important to you? &lt;a href="https://cloudsmith.com/company/contact-us/" rel="noopener noreferrer"&gt;Let us know&lt;/a&gt;! &lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>debian</category>
    </item>
    <item>
      <title>Integrating a Cloudsmith Repository with a GitLab CI/CD Pipeline</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Thu, 10 Sep 2020 08:44:38 +0000</pubDate>
      <link>https://forem.com/cloudsmith/integrating-a-cloudsmith-repository-with-a-gitlab-ci-cd-pipeline-34mp</link>
      <guid>https://forem.com/cloudsmith/integrating-a-cloudsmith-repository-with-a-gitlab-ci-cd-pipeline-34mp</guid>
      <description>&lt;h2&gt;
  
  
  What is GitLab CI/CD
&lt;/h2&gt;

&lt;p&gt;GitLab CI/CD is a tool that is built into GitLab. It allows you to create automated tasks that you can use to form a Continuous Integration and Continuous Delivery / Deployment process.&lt;/p&gt;

&lt;p&gt;You configure GitLab CI/CD by adding a yaml file (called &lt;code&gt;.gitlab-ci.yml&lt;/code&gt;) to your source repository. This file creates a pipeline, which will then run when a code change is pushed to the repository. Pipelines are made up of a series of stages, and each stage can each contain a number of jobs or scripts. The GitLab Runner agent will then run these jobs.&lt;/p&gt;

&lt;p&gt;For an on-premise instance of GitLab, you can install the GitLab runner agent on your own instances, and it supports many different operating systems (thereby creating your own fleet of instances to run your pipelines). But to keep things simple in the following examples, we will use gitlab.com and the default hosted GitLab runner environments provided.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Cloudsmith with Gitlab CI/CD
&lt;/h2&gt;

&lt;p&gt;So why would you want to use Cloudsmith with your Gitlab CI/CD pipelines? Well, there are a few reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Universality&lt;/strong&gt; – Cloudsmith supports over 20 package formats, so whatever artifacts your project produces, you can find a home for them in a private Cloudsmith repository&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control&lt;/strong&gt; – Cloudsmith private repositories provide extensive security and access controls, that have been designed to accommodate workflows such as internal development, deployment or even distribution to external customers. The fine-grained permissions system available enables you to craft bespoke access control, and lock down or open up your repository as much or as little as you need.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation and Integration&lt;/strong&gt; – Thanks to the Cloudsmith CLI and also native support for format-specific package managers, a Cloudsmith private repository can fit in seamlessly with other tools in your development or distribution processes. It provides you with a single source of truth across your packages and dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance and Reliability&lt;/strong&gt; – As a cloud-native platform, Cloudsmith manages the availability and performance of your repositories. You don’t need to worry about managing a fleet of servers, containers or virtual machines. Global performance, backed by our ultra-fast CDN and multi-region infrastructure, ensures that your packages are delivered worldwide. Reliably, quickly and securely.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s not all. With features like custom domain support, configurable upstream proxying and caching, configurable edge caching rules, download logs/statistics and more, Cloudsmith aims to provide the best solution for all your package management needs. It really is the ideal tool in a high-velocity CI/CD workflow – precisely the type of workflow that GitLab CI/CD is intended to enable you to create.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s work through an example.
&lt;/h2&gt;

&lt;p&gt;OK, so let’s get started with a worked example. The very first thing you will need is some source code in a GitLab repository that you want to build.  For this example, we will build Ruby source code into a Ruby Gem package. &lt;/p&gt;

&lt;p&gt;Our project on GitLab has the following structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6a991y8wwflb9p2vovra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6a991y8wwflb9p2vovra.png" alt="Project Structure" width="488" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The important thing here, as previously mentioned, is the &lt;code&gt;.gitlab-ci.yml&lt;/code&gt; file. This is where we define the GitLab CI/CD pipeline that will run when we push a change to the GitLab repo.&lt;/p&gt;

&lt;p&gt;Let’s take a look at the .gitlab-ci.yml file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ruby:2.5"&lt;/span&gt;

&lt;span class="na"&gt;variables&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;RUBYGEMS_HOST&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://ruby.cloudsmith.io/demo/examples-repo"&lt;/span&gt;


&lt;span class="na"&gt;stages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;build&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;push&lt;/span&gt;

&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gem build cloudsmith-ruby-example.gemspec&lt;/span&gt;
  &lt;span class="na"&gt;artifacts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cloudsmith-ruby-example-*&lt;/span&gt;

&lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;push&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mkdir -p ~/.gem&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mv $CLOUDSMITH_API_KEY ~/.gem/credentials &amp;amp;&amp;amp; chmod 0600 ~/.gem/credentials&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gem push cloudsmith-ruby-example-1.0.1.gem&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first thing we have specified is the image that will be used when creating the Docker container for the GitLab runner that will execute this pipeline, in this case, Ruby 2.5. &lt;/p&gt;

&lt;p&gt;Next, we add an environment variable, &lt;code&gt;RUBYGEMS_HOST&lt;/code&gt;. This is where we define the URL of the Cloudsmith package repository that we will push the result of the build to.&lt;/p&gt;

&lt;p&gt;We then define two stages in this pipeline, the build stage and the push stage.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Build Stage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;build&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gem build cloudsmith-ruby-example.gemspec&lt;/span&gt;
  &lt;span class="na"&gt;artifacts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cloudsmith-ruby-example-*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This stage is pretty straightforward. We just run the &lt;code&gt;gem build&lt;/code&gt; command to build our Ruby source as defined in our cloudsmith-ruby-example.gemspec file. Following this, we have defined an &lt;code&gt;artifact&lt;/code&gt; job, as we need to temporarily store the output of the build so that the push stage next can use it. &lt;/p&gt;

&lt;p&gt;This is because different stages in a pipeline will run on a new runner instance, so a subsequent stage wouldn’t have the access to the package built in a previous stage. You could also perform any jobs required to build and push within the same stage, and therefore on the same runner to avoid this, but for more complex pipelines you’ll likely have many stages.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Push Stage
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;push&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;stage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;push&lt;/span&gt;
  &lt;span class="na"&gt;script&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mkdir -p ~/.gem&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mv $CLOUDSMITH_API_KEY ~/.gem/credentials &amp;amp;&amp;amp; chmod 0600 ~/.gem/credentials&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gem push cloudsmith-ruby-example-1.0.1.gem&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The push stage is a little bit more complex. This is due to the fact that we are going to push our package to a private Cloudsmith repo, which requires authentication.  The Ruby package manager, gem, allows you to store your authentication credentials (in our case, the Cloudsmith API Key) in a credentials file, located at &lt;code&gt;~/.gem/credentials&lt;/code&gt; – But of course, we don’t want to check this credentials file into our GitLab repository along with our source!&lt;/p&gt;

&lt;p&gt;So we can make use of GitLab's ability to add variables to the source code repository.  We can create a file variable called &lt;code&gt;CLOUDSMITH_API_KEY&lt;/code&gt;, and then as part of the push step, we add a job to move this variable into the required location before we run the &lt;code&gt;gem push&lt;/code&gt; command. &lt;/p&gt;

&lt;p&gt;You add this file variable in your GitLab repository settings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7bdxe96t6nwz30s2ar6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7bdxe96t6nwz30s2ar6w.png" alt="File Variable" width="756" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, when our push step runs, the &lt;code&gt;mkdir&lt;/code&gt; and &lt;code&gt;mv&lt;/code&gt; jobs will create the required &lt;code&gt;~/.gem/credentials&lt;/code&gt; file (with our Cloudsmith API Key in it), and all without exposing our API Key in any logs on the runner instance, nor checked in with our source code.&lt;/p&gt;

&lt;p&gt;The final job in our push step simply runs &lt;code&gt;gem push&lt;/code&gt; to upload the package we have built to our private Cloudsmith repo, as Cloudsmith repositories offer full native support for the &lt;code&gt;gem&lt;/code&gt; package manager.&lt;/p&gt;

&lt;p&gt;Triggering the pipeline&lt;/p&gt;

&lt;p&gt;All that is left to do is for us to make a change to our source, and then commit and push the change to our Gitlab repo.  Let’s see what happens when we do that. &lt;/p&gt;

&lt;p&gt;We make a change, commit it and push:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fle8tfqbt2gww265aqzu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fle8tfqbt2gww265aqzu1.png" alt="Commit Change" width="800" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Gitlab CI/CD pipeline starts, and the build stage executes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcl6drzaxc59ms1hbirtd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcl6drzaxc59ms1hbirtd.png" alt="Build Stage Executing" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The build stage runs &lt;code&gt;gem build&lt;/code&gt; to build the package and then stores it in GitLab’s temporary artifact storage:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdhf7e0b3lpt1xd30gcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frdhf7e0b3lpt1xd30gcx.png" alt="Build Stage Output" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Push stage then starts to execute once the Build stage completes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyti58upnrtn7nlwngxjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyti58upnrtn7nlwngxjy.png" alt="Push Stage Executing" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The push stage downloads the package from the temporary artifact storage, creates the required &lt;code&gt;~/gem/credentials&lt;/code&gt; file, and runs &lt;code&gt;gem push&lt;/code&gt; which uploads the package to our private Cloudsmith repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyti58upnrtn7nlwngxjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyti58upnrtn7nlwngxjy.png" alt="Push Stage Output" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that’s it, the pipeline is now complete and reports as "Passed":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdmzn1g1na1o212vcmru.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdmzn1g1na1o212vcmru.png" alt="Pipeline Complete" width="800" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we now go and login to Cloudsmith, and check our "examples-repo" repository, we can see that the Ruby gem we just built is present:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc8phh4unr2xq3tdicva6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc8phh4unr2xq3tdicva6.png" alt="Package in Repo" width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Integrating a private Cloudsmith repository with GitLab CI/CD pipeline is easy, whether you are building a package that Cloudsmith provides native tooling support for (like Ruby) or even if you are using the Cloudsmith CLI to push a raw file, or other binary artifacts.  You can add your own private Cloudsmith repository with just a couple of lines of configuration, and it just works. &lt;/p&gt;

&lt;p&gt;Package management can be complex and difficult, and doubly so if you are trying to manage your own package management solution and infrastructure at the same time.  Try it for yourself, and see the productivity and efficiency gains that you can get from a centralized, hosted, secure package management service.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>integrations</category>
      <category>gitlab</category>
    </item>
    <item>
      <title>Integrating a Cloudsmith Repository and a Buildkite pipeline</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 01 Sep 2020 11:45:02 +0000</pubDate>
      <link>https://forem.com/cloudsmith/integrating-a-cloudsmith-repository-and-a-buildkite-pipeline-58ke</link>
      <guid>https://forem.com/cloudsmith/integrating-a-cloudsmith-repository-and-a-buildkite-pipeline-58ke</guid>
      <description>&lt;h2&gt;
  
  
  Cloudsmith and Buildkite
&lt;/h2&gt;

&lt;p&gt;At Cloudsmith, you will often hear us refer to our mantra of “Automate Everything”. It's a quest that we never deviate from, and we believe that anything that can be automated, should be automated.&lt;/p&gt;

&lt;p&gt;With that in mind, we would like to show you how simple it is to integrate a Cloudsmith repository with your Buildkite pipeline, and automate the pushing of your build artifacts into your own private repository for further CI/CD steps or even as a source for your global distribution needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Buildkite?
&lt;/h2&gt;

&lt;p&gt;Buildkite is a platform for running fast, secure, and scalable continuous integration pipelines on your own infrastructure. That means you can use Buildkite to orchestrate and manage your own fleet of build hosts, and these can be anything from containers, to cloud instances, to bare metal servers.&lt;/p&gt;

&lt;p&gt;Why would I want to integrate Cloudsmith with Buildkite?&lt;br&gt;
Well, in short, a continuous integration pipeline is going to have an output, and you are going to need and want to put that output somewhere that is secure, controlled and integrates with all the other tooling that will form the next parts of your DevOps workflow - whether that is continuous deployment to production, distribution to an end-user or customer, or even consumption by another internal team as part of their development process.&lt;/p&gt;

&lt;p&gt;This is where Cloudsmith fits in, and this is another phrase you might hear us use quite a bit - Cloudsmith offers a central source of truth for your packages and build artifacts. We provide a global platform that gives you the performance, scalability, security and visibility that you need to control and manage your software assets.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using Buildkite and Cloudsmith – An Example:
&lt;/h2&gt;

&lt;p&gt;So, you’re let’s assume that you’re new to Buildkite, how do you get started? &lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1- Install the buildkite-agent
&lt;/h3&gt;

&lt;p&gt;The first thing that you need to do is install the buildkite-agent so that you have a machine (remember, this can be a container, a VM, or even a real server) that will act as your build host. Buildkite provides install instructions for all major platforms and operating systems:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ficmpmlukltt1gpbuaqvm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ficmpmlukltt1gpbuaqvm.png" alt="Buildkite agent supported OSes" width="783" height="223"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have installed the agent, you will see a new build host in the Buildkite UI:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj4sr6zpkgjs8dtanflky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fj4sr6zpkgjs8dtanflky.png" alt="Buildkite agent host" width="767" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this example, I have installed the buildkite-agent on a Debian instance.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2(a) – Create a pipeline
&lt;/h3&gt;

&lt;p&gt;The next thing you need to do is create your pipeline. A Buildkite pipeline is a series of steps that your build host(s) will execute in order to build your assets/artifacts.  For this example, we will create a pipeline that will compile a simple C source program, package it into a deb package and then push that deb package to a Cloudsmith repository.&lt;/p&gt;

&lt;p&gt;To get started, you give your pipeline a name, and then you specify a source repository for the pipeline. In this case, it is a GitHub repository (although Buildkite will also work with many other platforms as a source):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff7vb3q363h6ufc6siy0b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff7vb3q363h6ufc6siy0b.png" alt="New Buildkite Pipeline" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If using a private GitHub repository, you also need to remember to add an SSH key to your GitHub profile so that the host you have installed the buildkite-agent on can access the source repository.&lt;/p&gt;
&lt;h3&gt;
  
  
  2(b) – Add your pipeline steps.
&lt;/h3&gt;

&lt;p&gt;Pipeline steps are where you specify the commands or scripts that you need to run in order to build your source / project / application. In Buildkite, you can define these steps via the Buildkite UI or as a &lt;code&gt;pipeline.yaml&lt;/code&gt; file. To keep things simple, we will define two steps via the Buildkite UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PreBuild Step&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this step, we install the tools we need to build our source and package it into a deb package. We also install the Cloudsmith CLI:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fijs7hfe5ierellt5w84l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fijs7hfe5ierellt5w84l.png" alt="PreBuild Step" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BuildAndPushPackage Step&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this step, we use &lt;code&gt;make&lt;/code&gt; to compile our source and then we use &lt;code&gt;fpm&lt;/code&gt; to build the deb package. Finally, we use the &lt;code&gt;cloudsmith push&lt;/code&gt; command to push the package to our Cloudsmith repository:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsxw2na9z4mrg3d1rzqt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsxw2na9z4mrg3d1rzqt3.png" alt="BuildAndPushPackage Step" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The equivalent &lt;code&gt;pipeline.yaml&lt;/code&gt; file for these steps would look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PreBuild"&lt;/span&gt;
  &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sudo apt update&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sudo apt-get install ruby ruby-dev rubygems build-essential python-pip -y&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;sudo gem install --no-document fpm&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pip install cloudsmith-cli&lt;/span&gt; 

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;BuildAndPushPackage"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;make&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;fpm -f -s dir -t deb -v 1.0.1 -n cloudsmith-buildkite-test .&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;cloudsmith push deb demo/buildkite-demo/debian/buster cloudsmith-buildkite-test_1.0.1_amd64.deb&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more complex build pipelines, you’ll likely have a lot more steps and the advantage of using a &lt;code&gt;pipeline.yaml&lt;/code&gt; file is that you can version it and check it in right alongside your source.  &lt;/p&gt;

&lt;p&gt;One thing to note is that pipeline steps in Buildkite are stateless. As a result, if you have a fleet of agents then each step is not guaranteed to run on the same agent. This means that if a subsequent step need / relies on the output from a previous step, the output from one step will need to be stored and then retrieved. Buildkite provides temporary artifact storage that you can use for this purpose (see &lt;a href="https://buildkite.com/docs/pipelines/artifacts" rel="noopener noreferrer"&gt;here&lt;/a&gt; for more details), but to keep things simple in this example we performed the build and push in a single step.    &lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2(c) – Add a Github Webhook.
&lt;/h3&gt;

&lt;p&gt;We want this pipeline to start when we push a new commit of our source to our GitHub repository and for that, we can configure a GitHub Webhook. Conveniently, Buildkite provide a webhook URL that we just need to copy and paste into our GitHub webhook configuration, and then select the event type we wish to fire this webhook on (in this case, all pushes):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkmdnbibs411yngq1i4tr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkmdnbibs411yngq1i4tr.png" alt="GitHub Webhook" width="800" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it, our pipeline is now built and will be ready to run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3 – Environment hooks
&lt;/h3&gt;

&lt;p&gt;Buildkite supports several types of hooks that can run on a build host during a pipeline run and a final piece of configuration that we need to do is use an environment hook to configure our environment.&lt;/p&gt;

&lt;p&gt;As we are using the Cloudsmith CLI to push the package to our Cloudsmith repository, we need to set up our Cloudsmith API Key as an environment variable. We do this because we don’t want to store a sensitive secret like an API-Key in our pipeline source, or within a build step as a plain text environment variable where it could be exposed in logs. There are other alternative methods of managing secrets in Buildkite, see &lt;a href="https://buildkite.com/docs/pipelines/secrets" rel="noopener noreferrer"&gt;here&lt;/a&gt; for more details.&lt;/p&gt;

&lt;p&gt;Our environment hook is pretty simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;set -euo pipefail&lt;/span&gt;

&lt;span class="s"&gt;if [[ "$BUILDKITE_PIPELINE_SLUG" == "cloudsmith-buildkite-demo" ]]; then&lt;/span&gt;
    &lt;span class="s"&gt;export CLOUDSMITH_API_KEY="abcdefghijklmnop1234567890"&lt;/span&gt;
    &lt;span class="s"&gt;export PATH="$HOME/.local/bin:$PATH"&lt;/span&gt;

&lt;span class="s"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It does two things:   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sets the &lt;code&gt;CLOUDSMITH_API_KEY&lt;/code&gt; environment variable&lt;/li&gt;
&lt;li&gt;Adds the location that the Cloudsmith CLI is installed to our &lt;code&gt;PATH&lt;/code&gt;
Additionally, it only runs when executed by a pipeline with the name “cloudsmith-buildkite-demo”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;OK, at this stage our pipeline is built and ready, and the environment on our build host will be set up when the pipeline executes. It’s time to test it out.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4 – Push a change to our source repository.
&lt;/h3&gt;

&lt;p&gt;Now if we make a change our source, commit it and then push the change to our GitHub repository, our build will start:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh5b63k89qwrj2n8wjjsk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh5b63k89qwrj2n8wjjsk.png" alt="PreBuild Step Running" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And once the BuildAndPushPackage step has completed, we can view the output in the logs:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftzhuhutvfiym6axaujrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftzhuhutvfiym6axaujrv.png" alt="BuildAndPushPackage Step Complete" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that our deb package was successfully built and pushed to our Cloudsmith repository.&lt;/p&gt;

&lt;p&gt;If we now go to the repository on the Cloudsmith website, we can see the built package:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F16skjtg8ss1j4gfdb8n0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F16skjtg8ss1j4gfdb8n0.png" alt="Built Package in Cloudsmith repo" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  To sum up
&lt;/h2&gt;

&lt;p&gt;Buildkite is a very powerful and flexible CI management platform, and integrating your Cloudsmith repositories with your Buildkite pipelines is as simple as installing the Cloudsmith CLI and then using the Cloudsmith push command in your build steps. We would really encourage you to give it a go yourself, our trial is fully-featured and we are here to help you get started. No question is too big or too small. &lt;/p&gt;

&lt;p&gt;Happy Build(kite)ing! &lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>integrations</category>
      <category>buildkite</category>
    </item>
    <item>
      <title>Deploy packages from a Cloudsmith repository with Ansible</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 18 Aug 2020 15:31:58 +0000</pubDate>
      <link>https://forem.com/cloudsmith/deploy-packages-from-a-cloudsmith-repository-with-ansible-3lhg</link>
      <guid>https://forem.com/cloudsmith/deploy-packages-from-a-cloudsmith-repository-with-ansible-3lhg</guid>
      <description>&lt;h2&gt;
  
  
  What is Ansible?
&lt;/h2&gt;

&lt;p&gt;Ansible is an open source continuous configuration automation (CCA) tool.  You can use it to automate the management of the configuration of host systems. For example: installing and configuring applications, services, security policies; or to perform a wide variety of other administration and configuration tasks.&lt;/p&gt;

&lt;p&gt;You also can use Ansible with a provisioning tool (such as the excellent Terraform, from the awesome folks over at Hashicorp) to automate the entire build and deployment of your infrastructure, and take steps towards true Infrastructure-as-code DevOps practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ansible And Cloudsmith
&lt;/h2&gt;

&lt;p&gt;Ansible is also a perfect partner for your artifacts and assets stored in your private Cloudsmith repositories.  As your Cloudsmith repositories can be your single source of truth, with all the access control and permission control that they provide, they give you another secure layer to your infrastructure build and management. By providing you with control of the sources of your packages that you use with your Ansible configuration automation, you insulate yourself further from any upstream changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started – The Ansible Playbook.
&lt;/h2&gt;

&lt;p&gt;An Ansible playbook is where you define the series of tasks that you wish to perform to ensure the configuration of your hosts is in the desired state.  As an example, we have created an Ansible playbook that will install and configure a Cloudsmith repository for Debian packages, and then install a package from this repository&lt;/p&gt;

&lt;p&gt;Here is our example Ansible playbook:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- hosts: DebianHosts
  remote_user: dmckinney

  tasks:
    - name: add Cloudsmith Repository GPG key
      apt_key:
        url: https://dl.cloudsmith.io/QOH0JBRgKQx5lE7S/demo/examples-repo/cfg/gpg/gpg.7D4D4CE49534374A.key
        state: present
      become: yes

    - name: add Cloudsmith Repository
      apt_repository:
        repo: 'deb https://dl.cloudsmith.io/QOH0JBRgKQx5lE7S/demo/examples-repo/deb/debian buster main'
        state: present
        update_cache: yes
      become: yes

    - name: install Cloudsmith Example package
      apt:
        name: cloudsmith-debian-example
        state: present
        update_cache: yes
      become: yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break down what this playbook will do.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hosts:
&lt;/h3&gt;

&lt;p&gt;This is where we specify which of our hosts these tasks will run against. The hosts and their addresses are defined in a separate Ansible Inventory file and for this example, our inventory file is just a single host.&lt;/p&gt;

&lt;p&gt;These hosts can be bare metal servers, cloud instances or virtual machines etc. You can define different groups of hosts within a playbook for different tasks and in this way a single playbook can manage a single machine or several hundred or even thousands of hosts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remote User:
&lt;/h3&gt;

&lt;p&gt;This is where you specify the user on the host machine that the tasks will run as&lt;/p&gt;

&lt;h3&gt;
  
  
  Tasks:
&lt;/h3&gt;

&lt;p&gt;This is where we specify the tasks themselves.&lt;/p&gt;

&lt;p&gt;The first task is the “add Cloudsmith Repository GPG key” task.  This task uses the apt_key ansible module to retrieve the GPG key from our Cloudsmith Repository and install in on our host system. We specify the URL for the GPG key and as this is a private Cloudsmith repository the URL contains an embedded entitlement token to authenticate for read only access:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: add Cloudsmith Repository GPG key
      apt_key:
        url: https://dl.cloudsmith.io/QOH0JBRgKQx5lE7S/demo/examples-repo/cfg/gpg/gpg.7D4D4CE49534374A.key
        state: present
      become: yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also add the &lt;code&gt;state: present&lt;/code&gt; – which means Ansible will install the key if it is not already installed, and if it is already installed it will do nothing. This is important, as it means our task will be idempotent, meaning no matter how many times we run this task the outcome, and therefore the configuration will always be the same.  We will see this &lt;code&gt;state: present&lt;/code&gt; in all our ansible tasks in this playbook.  Finally, as all apt operations on our host system require sudo permissions, we add &lt;code&gt;become: yes&lt;/code&gt; which tells ansible to run this task with elevated permissions. Again, we will see this on all tasks in this playbook.&lt;/p&gt;

&lt;p&gt;The second task is the “add Cloudsmith Repository” task. This task uses the apt_repository Ansible module to install our Cloudsmith repository on our host system.  We specify the URL for the repository, again containing our embedded entitlement token for authentication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    - name: add Cloudsmith Repository
      apt_repository:
        repo: 'deb https://dl.cloudsmith.io/QOH0JBRgKQx5lE7S/demo/examples-repo/deb/debian buster main'
        state: present
        update_cache: yes
      become: yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final task is the “install Cloudsmith Example package” task, and this task uses the apt Ansible module to install a deb package. We just need to specify the name of the package we wish to install:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- name: install Cloudsmith Example package
      apt:
        name: cloudsmith-debian-example
        state: present
        update_cache: yes
      become: yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it, that’s all we need in this playbook to get this repository set up and our package installed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the playbook.
&lt;/h2&gt;

&lt;p&gt;To run a playbook, we use the &lt;code&gt;ansible-playbook&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ansible-playbook -i cloudsmith-demo-inventory cloudsmith-demo-playbook -K
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the &lt;code&gt;-K&lt;/code&gt; flag tells ansible to ask for our sudo password, but you can also store secrets and password encrypted using Ansible Vault – which means you could check the encrypted vault file into your version control system, alongside your playbooks themselves. But to keep things simple for this example, we will just have ansible ask us for the password:&lt;/p&gt;

&lt;p&gt;When we run this playbook, the output was as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fixv9ru0aaphxwq65kjpw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fixv9ru0aaphxwq65kjpw.png" alt="Ansible Playbook Run" width="800" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that the three tasks ran successfully, and report that they made a total of three changes. If we now check what packages we have installed our Debian host, we can see our cloudsmith-debian-example package:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa8iwd0izdgticb94b4b1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fa8iwd0izdgticb94b4b1.png" alt="Package Installed" width="693" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally, if we were to run this playbook a second time (or any subsequent number of times), it reports that all tasks are OK, no changes need to be made:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk0iaq0k69c9gq8y8umtq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fk0iaq0k69c9gq8y8umtq.png" alt="Ansible Package Rerun" width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  In Closing
&lt;/h2&gt;

&lt;p&gt;While this is a very simple example, we hope that it demonstrates the possibilities and the power of using a configuration automation tool like Ansible in association with a private Cloudsmith repository. It gives you the ability to automate not only common system configuration tasks, but deployment of your own packages, your own custom configurations and even the software build of your entire infrastructure. You can version these builds in your version control systems, track changes and provide an audit-trail-of-truth all the way back to your packages, stored securely in your own private repositories. &lt;/p&gt;

&lt;p&gt;We hope you have very happy continuous configuration automation!&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>integrations</category>
      <category>ansible</category>
    </item>
    <item>
      <title>Caching and Upstream Proxying For Maven Packages</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 11 Aug 2020 14:51:43 +0000</pubDate>
      <link>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-maven-packages-1nh9</link>
      <guid>https://forem.com/cloudsmith/caching-and-upstream-proxying-for-maven-packages-1nh9</guid>
      <description>&lt;p&gt;Managing dependencies is a fact of life in modern software development. But at Cloudsmith, we’re focused on ensuring that the process is as painless as possible.&lt;/p&gt;

&lt;p&gt;To that end, &lt;strong&gt;we’re delighted to announce both upstream proxying and caching for Maven packages&lt;/strong&gt;. Together they mean simpler, more reliable integration of third party packages into the development process. Better software, faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upstream Proxying
&lt;/h2&gt;

&lt;p&gt;In the simplest terms, upstream proxying means &lt;strong&gt;Cloudsmith is now your single point of contact for all Maven packages or dependencies&lt;/strong&gt;. By proxying upstream dependencies located in Maven Central (the ‘accepted’ central repository for Java packages), Cloudsmith enables your organization, and your build systems, to deal with a single point of contact (us) rather than having to build and manage multiple integrations.&lt;/p&gt;

&lt;p&gt;To put that another way, if your build requires any specific dependency, and informs Cloudsmith of that requirement, we will find that dependency upstream and proxy within our platform. This ensures that the dependency is made available to your organization in the same way that every other package, dependency or asset within Cloudsmith is.&lt;/p&gt;

&lt;p&gt;This process is completely transparent and controllable to the Cloudsmith customer. You determine ahead of time which repositories you want Cloudsmith to check, and the precedence or priority between them. We also allow our users to specify what to do in the event of upstream failure - whether to retry, and after what period of time.&lt;/p&gt;

&lt;p&gt;All in, upstream proxying is one more step in ensuring that dependencies are available when you need them, and available through Cloudsmith: meaning simpler integration and faster builds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caching
&lt;/h2&gt;

&lt;p&gt;A step further, if you like, is caching. This involves Cloudsmith locating, downloading and storing dependencies within the Cloudsmith environment. So in other words, rather than act as a go-between Cloudsmith does the whole job.&lt;/p&gt;

&lt;p&gt;This can have many benefits, but primary among them are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guaranteed great performance. Cloudsmith ensures lightning-fast delivery to any location on the globe - not something you can take for granted when integrating packages from public repositories.&lt;/li&gt;
&lt;li&gt;Control: storing packages and dependencies within Cloudsmith gives you a greater ability to scan for vulnerabilities, check licensing implications, and monitor where and how packages are used. These things are not possible (or are at least difficult) when integrating straight from public repositories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Caching gives you all these advantages, but you can still define when Cloudsmith goes looking for a new version of any given package before bringing it into your own private repository, so you lose no control when it comes to precisely how Cloudsmith and Maven Central interact.&lt;/p&gt;

&lt;p&gt;Together, these new features bring Cloudsmith closer than ever to our goal: becoming a single source of truth for all the software assets an organization uses. By providing a single integration for all packages and dependencies we greatly improve the reliability and simplicity of development and deployment processes. And by bringing all assets together within the Cloudsmith environment we allow for greater levels of control and security than ever before.&lt;/p&gt;

&lt;p&gt;If you want more information on getting started with proxying and caching with Cloudsmith, &lt;a href="https://help.cloudsmith.io/docs/proxying" rel="noopener noreferrer"&gt;check out our documentation here&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>maven</category>
    </item>
    <item>
      <title>Integrating AWS CodeBuild with Cloudsmith Repositories</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Mon, 29 Jun 2020 16:07:47 +0000</pubDate>
      <link>https://forem.com/cloudsmith/integrating-aws-codebuild-with-cloudsmith-repositories-2948</link>
      <guid>https://forem.com/cloudsmith/integrating-aws-codebuild-with-cloudsmith-repositories-2948</guid>
      <description>&lt;h1&gt;
  
  
  AWS Codebuild and Cloudsmith
&lt;/h1&gt;

&lt;p&gt;At Cloudsmith, we pride ourselves in being the central source of truth for your packages and build artifacts. We provide one global platform to centralize your assets and give you the control and visibility that you need as part of a modern DevOps process. &lt;/p&gt;

&lt;p&gt;As part of that effort, we’re delighted to announce that if you’re using AWS CodeBuild as part of your CI/CD workflow and pipelines, we can offer you a simple way to get the output of your build processes into your Cloudsmith repository&lt;/p&gt;

&lt;h2&gt;
  
  
  What is AWS CodeBuild?
&lt;/h2&gt;

&lt;p&gt;AWS CodeBuild is a fully managed continuous integration service that allows you to automate your source compilation, test running and packaging of your software. There is nothing to install or maintain, and you can be up and running in minutes with your own build pipeline. &lt;/p&gt;

&lt;p&gt;Why would I want to integrate Cloudsmith with CodeBuild? &lt;br&gt;
Much like CodeBuild, Cloudsmith is a fully managed repository service. And just like CodeBuild, there is nothing to install or maintain, we take care of all of that for you.&lt;/p&gt;

&lt;p&gt;When you automate your build process with CodeBuild, you’ll need somewhere to store the resulting build artifact(s). Of course, you could store these somewhere basic, like an S3 bucket or maybe even an on-premise storage system of some kind. But doing that means you’d miss out on some of the distinct advantages Cloudsmith provides, namely: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance / Reliability&lt;/strong&gt;. Cloudsmith will deliver your artifacts and packages to customers or distributed teams at the lowest latency possible. Configurable global storage regions, configurable edge caching rules and a fast Global CDN mean users never have to wait to consume or use the output of your builds - no matter where they are.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access Controls / Security&lt;/strong&gt;. We provide fine-grained access controls, enabling you to grant teams and end users  the precise level of access that they need, and no more - including SAML/SSO integration so that you can plug into your existing enterprise auth systems. We also allow you to create read-only access tokens with additional configurable restrictions - if you are vendoring / selling software to end users, for example.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Universality&lt;/strong&gt;. We support a wide variety of package formats, including raw files, binaries or disk images. So whatever the output of your CodeBuild process is, we can support it - including integration with the native package management tools for most formats. The goal with Cloudsmith is simple: that it just works. 
This list is far from exhaustive - there are many, many reasons you’d want to use Cloudsmith as a platform to host and store your build artifact(s). We are happy to talk about this at great length, far longer than we can fit in here 😊 Just contact us if you’d like to chat more about it!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The bottom line: in much the same way you probably wouldn’t entertain the overheads involved in standing up your own server farm to run your CI/CD process, you don’t need to do that either for your package repositories. &lt;/p&gt;

&lt;p&gt;Using AWS CodeBuild with Cloudsmith - A worked example.&lt;br&gt;
OK, so how do we go about integrating our Cloudsmith repository with our CodeBuild projects? Let's work through an example. &lt;/p&gt;

&lt;p&gt;This example will be pretty straightforward - we will build a Debian package from source stored in a GitHub repository and then push the resulting build to our private Cloudsmith repository. &lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1. Set up our CodeBuild Project
&lt;/h2&gt;

&lt;p&gt;You use the AWS Console to set up a new CodeBuild Project. Just select “Create Build Project” to get started: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd50iyb8hxf9bc4nf0j1k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd50iyb8hxf9bc4nf0j1k.png" alt="Create Build" width="800" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you give your project a name, an optional description and any additional optional tags:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94zm0rq42afm21fqniwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F94zm0rq42afm21fqniwh.png" alt="Project Name and Description" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You then select a source for your project, in this case it’s a GitHub repository, but other source repository types are supported:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzwsbi0corlfukn1bx71w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzwsbi0corlfukn1bx71w.png" alt="Source Repository" width="800" height="641"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As shown above, I have configured a GitHub personal access token to allow CodeBuild to access my private GitHub repository.&lt;/p&gt;

&lt;p&gt;Then we configure the webhook that we want to use to kick start this build. In this example, we will just start the build on any push to the specified GitHub repository: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" alt="Source Webhook" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we select the container environment that we need to run this build, and in this case we will use the latest available Ubuntu image, and we will create a new AWS IAM service role at the same time: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" alt="Source Environment" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally, we will specify that this project is going to use a buildspec file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffq0h1nf49c2p4r4zcrwm.png" alt="buildspec selection" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A buildspec file is where we define the phases of the build and what commands / actions we wish to perform as part of the build process. We will go into this in more detail in the next step! &lt;/p&gt;

&lt;p&gt;You then just click “Create Build Project” to finish. &lt;/p&gt;
&lt;h1&gt;
  
  
  Step 2 - The buildspec file
&lt;/h1&gt;

&lt;p&gt;Our buildspec file contains all the information required to define our build process. We store this buildspec file in our GitHub repository along with the source code that we are building. A buildspec file can be as complex or as simple as your individual project requires, but for this example it’s pretty simple. &lt;/p&gt;

&lt;p&gt;You’ll need to set up any environment variables that your build process requires. In our example, we only need a single environment variable; our Cloudsmith API Key.  We need this to use the Cloudsmith CLI to push our build artifact to our Cloudsmith repository, and we don’t want to store our API-Key as plain text in the buildspec file as it would then be revealed in any build logs - not good! &lt;/p&gt;

&lt;p&gt;To achieve this, we use AWS Secrets Manager to securely store our API-Key, and then we can reference it in our buildspec file as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;env:
  secrets-manager:
    CLOUDSMITH_API_KEY:CodeBuild/CloudsmithAPI:CLOUDSMITH_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At a minimum you then, you’ll need 3 phases in your build: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An install phase&lt;/li&gt;
&lt;li&gt;A build phase&lt;/li&gt;
&lt;li&gt;A post-build phase&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Install phase:
&lt;/h3&gt;

&lt;p&gt;The install phase is where we install any prerequisites that our build needs, and this of course will vary depending on what you are building and what your individual requirements are. In our case that means the required tooling to build our Debian package, and of course the correct Python runtime for the Cloudsmith CLI  and the Cloudsmith CLI itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;install:
  runtime-versions:
    python: 3.x
  commands:
    - apt update
    - apt-get install ruby ruby-dev rubygems build-essential -y
    - gem install --no-document fpm
    - pip install cloudsmith-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Build phase:
&lt;/h3&gt;

&lt;p&gt;The build phase is where we execute the commands required to actually build our package. For our Debian package, it’s pretty straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build:
  commands:
    - make
    - fpm -f -s dir -t deb -v 1.0.1 -n cloudsmith-codebuild-test .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Post-build phase
&lt;/h3&gt;

&lt;p&gt;This is where the magic happens! In the post build phase, we only require a single command - &lt;code&gt;cloudsmith push&lt;/code&gt; to upload the result of the build to our Cloudsmith repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;post_build:
  commands:
    - cloudsmith push deb demo/codebuild-demo/debian/buster cloudsmith-codebuild-test_1.0.1_amd64.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it, that’s all we need to build this package, and store it in our Cloudsmith repository.  It really is that simple. Now of course, your build process itself may be a lot more complex, but to add Cloudsmith to your build process really is just two commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. pip install cloudsmith-cli
2. cloudsmith push FORMAT OWNER/REPOSITORY PACKAGE_FILENAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We don’t get in the way, you don’t need to totally reconfigure your entire build and we try to make it as easy as possible for you to get up and running! &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 - Running the Build
&lt;/h2&gt;

&lt;p&gt;As we configured this CodeBuild project to start on a push to our GitHub repository, If we just make a change to our source and then commit the change the build will start: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foegu1jxp2qdcl7av97bd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foegu1jxp2qdcl7av97bd.png" alt="Build starting" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The job has been Submitted, Queued and CloudBuild is now provisioning the container to run the build.  Once provisioned, we can tail the logs to watch the progress of the build:&lt;/p&gt;

&lt;p&gt;Installing the Cloudsmith CLI: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F28ql41z0hfcgt7ovdgoe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F28ql41z0hfcgt7ovdgoe.png" alt="Cloudsmith CLI Installing" width="800" height="30"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pushing build artifact to Cloudsmith:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhnork529zbq1nuqsru4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhnork529zbq1nuqsru4c.png" alt="cloudsmith upload" width="800" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the build finishes, our package has been built successfully and uploaded to our Cloudsmith Repository. If we now login to Cloudsmith and view the repository, we can see our package: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb2pg4qgm7ssgfwje3gaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fb2pg4qgm7ssgfwje3gaw.png" alt="Package in Cloudsmith Repository" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  To sum up
&lt;/h1&gt;

&lt;p&gt;We hope that this demonstrates how simple it is to integrate Cloudsmith with your existing (or new) AWS CodeBuild projects, and gives you an idea of what you can achieve with your own CI/CD pipelines. &lt;/p&gt;

&lt;p&gt;If you’d like to try it yourself, you can sign up for a fully-featured free trial at cloudsmith.com, and we are here to help you every step of the way. &lt;/p&gt;

&lt;p&gt;We wish you very happy and successful builds!  &lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>integrations</category>
      <category>awscodebuild</category>
    </item>
    <item>
      <title>Add Cloudsmith to your DevOps Toolkit</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Wed, 29 Apr 2020 20:19:17 +0000</pubDate>
      <link>https://forem.com/cloudsmith/add-cloudsmith-to-your-devops-toolkit-1oni</link>
      <guid>https://forem.com/cloudsmith/add-cloudsmith-to-your-devops-toolkit-1oni</guid>
      <description>&lt;p&gt;At Cloudsmith, we are all about automation and we believe that first-class command line tooling makes up a significant part of that. With that in mind, we are continually improving the Cloudsmith Command Line Interface (CLI). This short post will guide you through installing / setting up the CLI and show you some examples of the things you can achieve with it!&lt;/p&gt;

&lt;h1&gt;
  
  
  Setup
&lt;/h1&gt;

&lt;p&gt;The Cloudsmith CLI is built in Python atop the Cloudsmith API and as well as the API powering the CLI, we have designed the API so that it is fully compatible with Swagger and OpenAPI 2.0, allowing us to generate bindings in more or less any programming language.&lt;/p&gt;

&lt;p&gt;If you have Python set up already, then it is super simple to install the CLI from pip using:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install cloudsmith-cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will install the Cloudsmith CLI itself and any required dependencies.&lt;br&gt;
Once installed you can then configure the CLI it with:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith login&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command will prompt you for your Cloudsmith username and password, and it will then retrieve your Cloudsmith API key and set up the required configuration and credential files automatically:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbjpbln13vuyowo15b4pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbjpbln13vuyowo15b4pm.png" alt="cloudsmith login" width="800" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To check that it was all installed and configured correctly, use the command:&lt;/p&gt;

&lt;p&gt;cloudsmith whoami&lt;/p&gt;

&lt;p&gt;This will return the current user that the CLI is authenticating as:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdwibxix73fazw55htxt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdwibxix73fazw55htxt.png" alt="cloudsmith whoami" width="770" height="93"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Let's try some commands!
&lt;/h1&gt;

&lt;p&gt;Once you have the CLI installed and configured you can start to try out some of the operations. To get a list of the supported commands, just do:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F39cw17wf205skesxklem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F39cw17wf205skesxklem.png" alt="cloudsmith commands" width="800" height="769"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a LOT you (or the systems you are automating!) can do with the Cloudsmith CLI, but rather than explore every single command here how about we start with what is sure to be a very common use-case - uploading (pushing) a package.&lt;/p&gt;

&lt;p&gt;We can see above that the command will be &lt;code&gt;cloudsmith push&lt;/code&gt;, and you can get additional help and information on any command by using the &lt;code&gt;-h&lt;/code&gt; flag:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2k6jzfte7t8ujne8uz4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2k6jzfte7t8ujne8uz4d.png" alt="cloudsmith push npm -h" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OK, that makes more sense now! So to push an &lt;code&gt;npm&lt;/code&gt; package we need the push command, the repository owner (namespace), repository identifier, and the package file name! Easy:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith push npm OWNER/REPO PACKAGE_FILE&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzivwlqupav87j5p9kb0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzivwlqupav87j5p9kb0v.png" alt="cloudsmith push npm" width="800" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Right, that works! The CLI has now uploaded the files, created the package and waited for synchronisation to complete (synchronisation is where we extract the metadata and files associated with the package, and make the package available for download).&lt;/p&gt;

&lt;p&gt;Remembering that all Cloudsmith repositories are fully multi-format, i.e you can upload any of the package types that we support into the same repository, we can then push a Python package using the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith push python OWNER/REPO PACKAGE_FILE&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpdmkz2luudrljju253u1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpdmkz2luudrljju253u1.png" alt="cloudsmith push python" width="800" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And to push a Cargo crate it would be:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith push cargo OWNER/REPO PACKAGE_FILE&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fitb3uuvuwx0grgqt4z89.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fitb3uuvuwx0grgqt4z89.png" alt="cloudsmith push cargo" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm sure you're sensing a theme here... :-) . Some other formats (such as Debian or Maven) have additional requirements that change the command used, but help is always available using the &lt;code&gt;-h&lt;/code&gt; flag.&lt;/p&gt;

&lt;p&gt;The point is, it's simple, quick and easy! The whole idea of the Cloudsmith CLI is to enable your automation, not get in your way. It supposed to make your life using Cloudsmith easier!&lt;/p&gt;
&lt;h1&gt;
  
  
  Some other commands!
&lt;/h1&gt;

&lt;p&gt;So what else can we do with the Cloudsmith CLI. Well, lots of things! Let's start by seeing how we can list the contents of a repository. To do this we use the command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cloudsmith list pkgs OWNER/REPO&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Like so:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flangmnry3pjtec2101iz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Flangmnry3pjtec2101iz.png" alt="cloudsmith list pkgs" width="800" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again, it's Easy! It will probably come as no surprise at all at this point that the command to get a list of all repositories for an account is just:&lt;br&gt;
&lt;code&gt;cloudsmith list repos OWNER&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And similarily, the command to retreive a list of all the Entitlement Tokens created in a repository is simply:&lt;br&gt;
&lt;code&gt;cloudsmith list ents OWNER/REPO&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We've also got the following resources to help you:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://help.cloudsmith.io/docs/cli" rel="noopener noreferrer"&gt;CLI Documentation&lt;/a&gt; - for additional help.&lt;br&gt;
&lt;a href="https://github.com/cloudsmith-io/cloudsmith-cli" rel="noopener noreferrer"&gt;CLI GitHub Repository&lt;/a&gt; - to see how it is built.&lt;br&gt;
&lt;a href="https://dev.toCLI%20Cloudsmith%20Repository"&gt;CLI Cloudsmith Repository&lt;/a&gt; - for pre-releases of the CLI.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/R-g8ZhDwTKk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Finally, we wish you well on your path to better software and better DevOps. Remember - &lt;strong&gt;Be Awesome, Automate Everything&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>cli</category>
      <category>devops</category>
    </item>
    <item>
      <title>Vendors Connect. Powering digital distribution with Zapier &amp; Cloudsmith.</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 14 Apr 2020 09:09:04 +0000</pubDate>
      <link>https://forem.com/cloudsmith/vendors-connect-powering-digital-distribution-with-zapier-cloudsmith-3me5</link>
      <guid>https://forem.com/cloudsmith/vendors-connect-powering-digital-distribution-with-zapier-cloudsmith-3me5</guid>
      <description>&lt;p&gt;At Cloudsmith, we are always looking for new ways to make our customers’ lives easier, more efficient and more highly automated. With this in mind we are extremely excited to announce that we have developed an official Cloudsmith Zapier integration!&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Zapier?
&lt;/h1&gt;

&lt;p&gt;Zapier is an automation platform that allows you to connect your favourite apps and services together (such as Stripe, Slack, Gmail and more). You can connect multiple apps together to automate tasks and you can do all of this without needing developers to build or code custom integrations - the simple interface is entirely point-n-click driven and is extremely easy to set up.&lt;/p&gt;

&lt;p&gt;For example - maybe you have packages on Cloudsmith that you would like to sell commercially. Every time you get payment from a customer through your payment provider (Stripe, Shopify, Paypal etc), you could log into Cloudsmith, create an Entitlement Token in the relevant repository and then share that Entitlement Token with your customer.  (For more information about Cloudsmith Entitlement Tokens, see here)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OR - you could automate this entire process with the Cloudsmith Zapier integration!&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Let’s work through an example!
&lt;/h1&gt;

&lt;p&gt;Get started by logging into your Zapier account and creating a new “Zap”. A Zap is the name for the automated series of steps between your chosen apps that Zapier will perform.&lt;/p&gt;

&lt;p&gt;Open the menu on the left and click “Make a Zap:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw90q4ylg6os9kgnu8qno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fw90q4ylg6os9kgnu8qno.png" alt="Make a Zap" width="299" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1
&lt;/h2&gt;

&lt;p&gt;Choose the app that you want to use to “Trigger” this Zap, in this example we are going to use Shopify:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0h4q9i9ieo3v66vyuo2v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0h4q9i9ieo3v66vyuo2v.png" alt="Choose Trigger" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt; - you will need to authorize Zapier to access your Shopify account after clicking “Continue”.  This process varies depending on which payment provider / platform you are using, but for Shopify you are presented with a window to log into the Shopify platform and authorize Zapier. Other payment providers work similarly, or offer you the option to add an API Key.&lt;/p&gt;

&lt;p&gt;Once you have authorized Zapier, you continue to set up the trigger event, in this case - specifying exactly what order conditions will fire this trigger:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnr03l4y1c43gwq4laj4r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnr03l4y1c43gwq4laj4r.png" alt="Trigger Event" width="800" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You then test the trigger and it will pull in any orders from Shopify (or sample order data if your Shopify account does not have any paid orders yet):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiaj1z1d3u9ykihueewqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiaj1z1d3u9ykihueewqx.png" alt="Testing the Trigger" width="800" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have this all completed, click “Done Editing” to move to the next step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2
&lt;/h2&gt;

&lt;p&gt;Click the "+" icon under your Trigger step, chose the Cloudsmith app from the dropdown list, and then Chose the “Action” that you wish to perform - in this case it is “Create Entitlement Token”:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg2s328dwtpdijzq6kqu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg2s328dwtpdijzq6kqu1.png" alt="Action Event" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will need to authorize Zapier to access your Cloudsmith account, and you do this by adding your Cloudsmith API Key, which you can retrieve from here&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiscjzecf4u8qfd0vnyaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fiscjzecf4u8qfd0vnyaf.png" alt="Cloudsmith API Authorization" width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have entered your Cloudsmith API Key you then specify the details of the Entitlement Token that you would like to create. The only required fields are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Token Name&lt;/li&gt;
&lt;li&gt;Repository Owner (namespace)&lt;/li&gt;
&lt;li&gt;Repository&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can enter a Token Name manually or you can pull in output from your initial trigger step (such as an email address, customer ID or other identifying information from your Shopify order). For the Repository Owner and Repository, you can select from the dropdown menus. In addition, you can specify a custom string for the Token itself (although if you don't then one is generated for you!)&lt;/p&gt;

&lt;p&gt;You can optionally specify any restrictions you would like associated with this Entitlement Token, such as an allowed number of downloads or a valid to/from date.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbkrx05axwrpvl9xsfbq4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbkrx05axwrpvl9xsfbq4.png" alt="Create Entitlement Token Step" width="800" height="1231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the example above, we will use the customer email address from the Shopify order as the Token Name, the order placement date as the Token Valid From date, and we will limit the number of downloads to 10.&lt;/p&gt;

&lt;p&gt;You can then click “Continue” to test and review your selections, and then click “Done Editing” to complete this step.&lt;/p&gt;

&lt;p&gt;At this point, your Zap is now set up to create an Entitlement Token in your specified Cloudsmith Repository for every complete Shopify order that you receive.  &lt;/p&gt;

&lt;p&gt;If we now create an order in Shopify, and then check the repository that we specified in the “Create Entitlement Token” action, we can confirm that the Entitlement Token has been created, with the details from the Shopify order:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh88v0k0lki9mkhwpd2cu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fh88v0k0lki9mkhwpd2cu.png" alt="Token in Repository" width="800" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may wish to add an additional output step to the Zap that could, for example, email the Entitlement Token to your customer directly or maybe use an additional Zapier app to integrate with your chosen mail or CRM platform - This would enable you to keep a track of Entitlement Tokens so that you can automatically disable them using the “Disable Entitlement Token” action in the Cloudsmith Zapier integration (perhaps if a customer unsubscribes or cancels)&lt;/p&gt;

&lt;p&gt;We hope that this demonstrates how simple it is to automate a payment and token creation workflow for a Cloudsmith repository. There are many integrations available on the Zapier platform and we are pleased to be able to offer this official Cloudsmith integration as an option for our customers that use the Cloudsmith platform for distribution. As always, if you need any help, guidance or additional information please just contact us and we will be happy to work through it with you!&lt;/p&gt;

&lt;p&gt;Happy order processing! :-)&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>zapier</category>
      <category>integrations</category>
    </item>
    <item>
      <title>Cloudsmith + CocoaPods</title>
      <dc:creator>Dan McKinney</dc:creator>
      <pubDate>Tue, 24 Mar 2020 09:45:16 +0000</pubDate>
      <link>https://forem.com/cloudsmith/cloudsmith-cocoapods-503h</link>
      <guid>https://forem.com/cloudsmith/cloudsmith-cocoapods-503h</guid>
      <description>&lt;p&gt;We are proud to announce the availability of Cloudsmith for CocoaPods.&lt;/p&gt;

&lt;p&gt;One of the key attributes of the Cloudsmith platform is &lt;em&gt;universality&lt;/em&gt;. We think it’s important that you can use Cloudsmith to manage packages and dependencies no matter what format they are in.&lt;/p&gt;

&lt;p&gt;Taking this approach means distributed development teams have a single source of truth for &lt;em&gt;all&lt;/em&gt; their software assets, and can store, share and secure them all in exactly the same way and in the same place. &lt;/p&gt;

&lt;p&gt;It also means that other processes within the DevOps stack only need to speak to one partner rather than many, with a consequent reduced risk of things going wrong. &lt;/p&gt;

&lt;p&gt;Result: &lt;strong&gt;faster delivery pipelines&lt;/strong&gt;, &lt;strong&gt;less broken builds&lt;/strong&gt;, &lt;strong&gt;happy customers&lt;/strong&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introducing CocoaPods
&lt;/h1&gt;

&lt;p&gt;To ensure that Cloudsmith is and remains a ‘universal’ package management solution, we continue to add formats and extend the scope of the platform. Hence the launch today of our support for CocoaPods.&lt;/p&gt;

&lt;p&gt;CocoaPods is the dependency manager for Swift or ObjectiveC packages (or Pods in this context) used within Cocoa projects. And Cocoa is the framework within which MacOS and iOS applications are developed.&lt;/p&gt;

&lt;p&gt;As a result, Cocoa and CocoaPods are popular. &lt;a href="https://codeburst.io/10-top-programming-languages-in-2019-for-developers-a2921798d652" rel="noopener noreferrer"&gt;In 2019 Swift was the 6th most loved programming language in the Stack Overflow developer survey&lt;/a&gt; and the 10th most active language on GitHub.&lt;/p&gt;

&lt;p&gt;It is also commonly used alongside other formats and languages (no surprise for a framework focused solely on MacOS and iOS) so being just one of many popular formats supported by Cloudsmith really matters.&lt;/p&gt;

&lt;p&gt;It’s easy to get control of your Pods. In fact it only &lt;a href="https://cloudsmith.io/user/signup/" rel="noopener noreferrer"&gt;takes a minute to set up a private repository&lt;/a&gt; with Cloudsmith. The short demo video below should help you get started:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/VHhSZ8MqCDc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Then your entire team can enjoy cloud-native, secure and universal package management - with none of the hassles associated with managing an on-premises solutions.&lt;/p&gt;

&lt;p&gt;Taking the Cloudsmith approach allows development teams to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Develop Pods internally and share them privately to other teams&lt;/li&gt;
&lt;li&gt;Distribute and deploy your own Pods in a pipeline at your org&lt;/li&gt;
&lt;li&gt;Distribute Pods as commercial software&lt;/li&gt;
&lt;li&gt;Make modifications to public Pods, without republishing publicly&lt;/li&gt;
&lt;li&gt;Mirror public Pods and isolate from uncontrolled upstream issues&lt;/li&gt;
&lt;li&gt;Capture the exact state of your dependencies at a particular version/release&lt;/li&gt;
&lt;li&gt;Control (whitelist/blacklist) the exact Pods allowed for your org&lt;/li&gt;
&lt;li&gt;Keep track of the exact versions/releases of the Pods you have/use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short: &lt;strong&gt;deliver all the benefits of Cloudsmith that are already enjoyed by development teams all over the world today&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you want to join them, &lt;a href="https://cloudsmith.io/user/signup/" rel="noopener noreferrer"&gt;sign up today&lt;/a&gt; and start hosting and distributing your Pods with Cloudsmith!&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>cocoapods</category>
      <category>swift</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
