<?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: Alan Carson</title>
    <description>The latest articles on Forem by Alan Carson (@acarson).</description>
    <link>https://forem.com/acarson</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%2F136725%2F87e02f83-016b-49c5-a198-c19c9dc5d43f.png</url>
      <title>Forem: Alan Carson</title>
      <link>https://forem.com/acarson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/acarson"/>
    <language>en</language>
    <item>
      <title>Cloudsmith + Bitbucket</title>
      <dc:creator>Alan Carson</dc:creator>
      <pubDate>Tue, 13 Aug 2019 15:57:13 +0000</pubDate>
      <link>https://forem.com/cloudsmith/cloudsmith-bitbucket-3he5</link>
      <guid>https://forem.com/cloudsmith/cloudsmith-bitbucket-3he5</guid>
      <description>&lt;p&gt;At &lt;a href="https://cloudsmith.com" rel="noopener noreferrer"&gt;Cloudsmith&lt;/a&gt;, our mission is to make it as easy and straightforward as possible to get your packages into our system from where you can manage and distribute them to your heart's content.&lt;/p&gt;

&lt;p&gt;To this end, we recently spent some time with Atlassian's Bitbucket team at &lt;a href="http://go.atlassian.com/awspace?_ga=2.187063531.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;AppWeek in Berlin&lt;/a&gt; to build a &lt;a href="https://confluence.atlassian.com/bitbucket/pipes-958765631.html?_ga=2.187063531.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;Bitbucket Pipe&lt;/a&gt; that makes it simple for Bitbucket users to easily turn their source code into distributable packages and deploy to Cloudsmith in just a few lines of YAML.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Pipes build on top of Bitbucket's excellent &lt;a href="https://bitbucket.org/product/features/pipelines?_ga=2.187063531.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;Pipelines&lt;/a&gt; functionality which allows users to automate their build and deploy processes, whatever form they may take.&lt;/p&gt;

&lt;p&gt;Bitbucket Pipes are, at their simplest, the combination of a Docker container and some YAML-formatted configuration. Pipes are designed to remove what would otherwise be repeated or verbose configuration from a user's pipeline. Pipes can be shared across repositories or organisations and make many common tasks almost trivial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Pipelines
&lt;/h2&gt;

&lt;p&gt;The Cloudsmith pipe is included in Bitbucket's collection of officially maintained pipes and is available by default for any user that wishes to include it in their pipeline.&lt;/p&gt;

&lt;p&gt;To use the pipe you'll first need an application or library that can be packaged into one of the formats that Cloudsmith support. You can see examples of Python and Javascript libraries in &lt;a href="https://bitbucket.org/cloudsmith-io/?_ga=2.193818862.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;Cloudsmith's Bitbucket account&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the purposes of this example we'll assume you're using the Python example from the link above.&lt;/p&gt;

&lt;p&gt;First, ensure that you can package your code using a Bitbucket pipeline by editing bitbucket-pipelines.yml in your repository. You can do so either via Bitbucket's web UI or using your normal editor and Git workflow.&lt;/p&gt;

&lt;p&gt;For the example library, a basic pipeline that builds a package when a new tag is created looks like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;image:
  name: atlassian/default-image:2

build: &amp;amp;build
  step:
    name: Build Python Package
    image: python:3.7
    script:
    - python setup.py sdist
    artifacts:
    - dist/**

pipelines:
  tags:
    release-*:
    - &amp;lt;&amp;lt;: *build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pipeline will build a new package each time you push an appropriate tag you your Bitbucket repository. The built package is then discarded as we have not yet added further instructions to tell Bitbucket what to do with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring the Pipe
&lt;/h2&gt;

&lt;p&gt;Next we'll add publish the package to Cloudsmith using our official pipe. We'll need to provide an API Key that the pipe can use to authenticate with Cloudsmith. You can find the official documentation for pipeline variables in the &lt;a href="https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html?_ga=2.220600667.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;Bitbucket documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The API Key should be added as a "secure" variable (so it doesn't leak into logs) with the name &lt;code&gt;CLOUDSMITH_API_KEY&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%2Fuploads%2Farticles%2Fkrkfqtda3bv0ufoxnx22.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%2Fuploads%2Farticles%2Fkrkfqtda3bv0ufoxnx22.png" alt="Alt Text" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once authentication is configured, you can add the pipe configuration to your pipeline.&lt;/p&gt;

&lt;p&gt;If using the web UI to configure your pipeline, you can select the Cloudsmith pipe right from your browser, from within the list of supported pipes as in the image below:&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%2Fuploads%2Farticles%2Fu3963tqzfi18un9nlpf9.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%2Fuploads%2Farticles%2Fu3963tqzfi18un9nlpf9.png" alt="Alt Text" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If using your local editor, you can follow the instructions in the &lt;a href="https://bitbucket.org/cloudsmith-io/publish?_ga=2.220600667.2132496434.1565627316-1859711499.1556636245" rel="noopener noreferrer"&gt;official README on Bitbucket&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once added, your pipeline YAML should look something like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;image:
  name: atlassian/default-image:2

build: &amp;amp;build
  step:
    name: Build Python Package
    image: python:3.7
    script:
    - python setup.py sdist
    artifacts:
    - dist/**

publish: &amp;amp;publish
  step:
    name: Publish Python Package
    script:
    - pipe: cloudsmith-io/publish:0.1.1
      variables:
        CLOUDSMITH_REPOSITORY: 'cloudsmith/examples'
        CLOUDSMITH_API_KEY: $CLOUDSMITH_API_KEY
        PACKAGE_FORMAT: 'python'
        PACKAGE_PATH: 'dist/*.tar.gz'

pipelines:
  tags:
    release-*:
    - &amp;lt;&amp;lt;: *build
    - &amp;lt;&amp;lt;: *publish

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration instructs the pipe to push artifacts to the &lt;a href="https://cloudsmith.io/~cloudsmith/repos/examples/packages/" rel="noopener noreferrer"&gt;cloudsmith/examples&lt;/a&gt; repository, with the API key we stored earlier. We're uploading a python package which is located at &lt;code&gt;dist/*.tar.gz&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the Pipe
&lt;/h2&gt;

&lt;p&gt;And that's it! Your pipe is now configured and ready to run. You should be able to push a new tag to Bitbucket and see your pipe run.&lt;/p&gt;

&lt;p&gt;Bitbucket's pipeline UI provides a great overview of the status of your jobs:&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%2Fuploads%2Farticles%2Fqp3cw8hz0jjbpru97aih.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%2Fuploads%2Farticles%2Fqp3cw8hz0jjbpru97aih.png" alt="Alt Text" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once pushed, you should see your shiny new package in the Cloudsmith UI, ready for download and install using your preferred tools:&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%2Fuploads%2Farticles%2F5dr1257n4sibobcotqiu.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%2Fuploads%2Farticles%2F5dr1257n4sibobcotqiu.png" alt="Alt Text" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Cloudsmith's Bitbucket pipe provides the easiest and simplest way for Bitbucket users to push their assets to &lt;a href="https://cloudsmith.io/repos/" rel="noopener noreferrer"&gt;Cloudsmith&lt;/a&gt;. Our official pipe is maintained by the Cloudsmith team and you can be sure it'll be kept up to date with all changes and features as we release them.&lt;/p&gt;

&lt;p&gt;As always, if you have any questions about the pipe (or anything else), we're available at &lt;a href="//support@cloudsmith.io"&gt;support@cloudsmith.io&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>bitbucket</category>
      <category>atlassian</category>
      <category>pipelines</category>
    </item>
    <item>
      <title>Cloudsmith + Rust = The World's First Private Cargo Registry Service</title>
      <dc:creator>Alan Carson</dc:creator>
      <pubDate>Fri, 17 May 2019 14:57:12 +0000</pubDate>
      <link>https://forem.com/cloudsmith/cloudsmith-rust-the-world-s-first-private-cargo-registry-service-2p18</link>
      <guid>https://forem.com/cloudsmith/cloudsmith-rust-the-world-s-first-private-cargo-registry-service-2p18</guid>
      <description>&lt;h2&gt;
  
  
  What is Rust? What is Cargo? What are Crates?
&lt;/h2&gt;

&lt;p&gt;Rust lang, or Rust, is a systems programming language, designed at Mozilla research, and intended to be a safer alternative to existing systems programming languages like C and C++, but still just as fast. Rust was originally started as a personal side-project by Mozilla engineer Graydon Hoare, but the company quickly and rightfully recognised its promise and began sponsorship of the project in 2009.&lt;/p&gt;

&lt;p&gt;Rust quickly became a critical part of Mozilla's efforts to improve the performance and reliability of their browser technology as part of the Servo project. Since then, Rust has only grown in popularity and appeal, year on year, and for the last four years has achieved the coveted top spot for "most loved programming language" on &lt;a href="https://insights.stackoverflow.com/survey/2019#technology-_-most-loved-dreaded-and-wanted-languages" rel="noopener noreferrer"&gt;Stack Overflow's Developer Survey&lt;/a&gt; (also a great read).&lt;/p&gt;

&lt;p&gt;Whilst Rust is maybe best known as a low-level systems language, the same properties that make it appealing for working close to the metal also make it appealing for many other use cases. Rust's memory-safety, ownership semantics, performance, and comprehensive type system (among others) combine to make Rust a very compelling choice in many fields of engineering.&lt;/p&gt;

&lt;p&gt;Whether you're writing a device driver for an embedded System-on-Chip (SoC), an operating system, a layout engine for a web browser, a web application, a package management service (heh), or a library for use in the WebAssembly ecosystem, Rust probably has you covered.&lt;/p&gt;

&lt;p&gt;Early on, the Rust community realised that for a modern programming language to be successful, it needs modern tooling to accompany it. To this end, various teams in the Rust community have concentrated on tooling, such that Rust is now widely regarded as having best-in-class tools in areas like build and package management; which is something that we (Cloudsmith) recognise, respect and adore.&lt;/p&gt;

&lt;p&gt;Rust therefore ships with its own package manager called &lt;a href="https://github.com/rust-lang/cargo" rel="noopener noreferrer"&gt;Cargo&lt;/a&gt;. Cargo is an all-in-one frontend for building, packaging and configuring your Rust projects. It can build and run your code (providing a developer-friendly interface to &lt;code&gt;rustc&lt;/code&gt;) and manages resolving and fetching any required dependencies (also known as "crates" in the Rust world).&lt;/p&gt;

&lt;p&gt;Cargo can install dependencies from a remote registry into your local project for building, using a command like &lt;code&gt;cargo install library&lt;/code&gt;. Until April of 2019 the only choice you really had was the official, public registry at &lt;a href="https://crates.io/" rel="noopener noreferrer"&gt;crates.io&lt;/a&gt;. Crates.io is maintained by the Rust team and is the default public registry for the Rust ecosystem. With the &lt;a href="https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html" rel="noopener noreferrer"&gt;release of Rust 1.34&lt;/a&gt;, Cargo now officially supports the use of registries other than crates.io, making it possible to run an alternative registry for the hosting of private or internal crates.&lt;/p&gt;

&lt;p&gt;There are several equally fantastic reasons for running/using your own registry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To develop Cargo packages internally and share them privately to other teams.&lt;/li&gt;
&lt;li&gt;To distribute and deploy your own Cargo packages in a pipeline at your org.&lt;/li&gt;
&lt;li&gt;To distribute Cargo packages as vendored software (i.e. maybe commercially).&lt;/li&gt;
&lt;li&gt;To make modifications to public Cargo packages, without republishing publicly.&lt;/li&gt;
&lt;li&gt;To mirror public Cargo packages, to isolate from uncontrolled registry events.&lt;/li&gt;
&lt;li&gt;To capture the exact state of your dependencies at a particular version/release.&lt;/li&gt;
&lt;li&gt;To control (whitelist/blacklist) the exact Cargo packages allowed for your org.&lt;/li&gt;
&lt;li&gt;To keep track of the exact versions/releases of Cargo packages you have/use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As such, if you're interested in the possibilities that hosting your own private or internal crates brings, then this is incredibly good news for you: Cloudsmith are proud to provide the World's first commercially available public and &lt;a href="https://cloudsmith.io/l/cargo-registry/" rel="noopener noreferrer"&gt;private Cargo registry hosting&lt;/a&gt;, with ultra-fast and secure delivery of your Rust packages, alongside all of the usual Enterprise-grade features that we provide.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rust: &lt;a href="https://www.rust-lang.org" rel="noopener noreferrer"&gt;https://www.rust-lang.org&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The Rust Programming Language: &lt;a href="https://doc.rust-lang.org/book/index.html" rel="noopener noreferrer"&gt;https://doc.rust-lang.org/book/index.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;the Cargo Book: &lt;a href="https://doc.rust-lang.org/cargo/index.html" rel="noopener noreferrer"&gt;https://doc.rust-lang.org/cargo/index.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting up a private Cargo registry at Cloudsmith
&lt;/h2&gt;

&lt;p&gt;Getting started with Cloudsmith and Cargo couldn't be simpler. First, you'll need a &lt;a href="https://cloudsmith.io/user/signup/" rel="noopener noreferrer"&gt;Cloudsmith account&lt;/a&gt; and a repository to which you can upload crates. Secondly, you'll need to ensure you're running at least version 1.34 (or later) of Rust.&lt;/p&gt;

&lt;p&gt;If you need to install Rust you can use &lt;a href="https://rustup.rs/" rel="noopener noreferrer"&gt;rustup&lt;/a&gt;, the Rust toolchain installer. Rust is available on most commonly used development platforms.&lt;/p&gt;

&lt;p&gt;You can check your currently installed Rust and Cargo versions like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ rustc --version
rustc 1.34.1 (fc50f328b 2019-04-24)
$ cargo --version
cargo 1.34.0 (6789d8a0a 2019-04-01)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see something like the above, you're ready to go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Publishing your Cargo crates to Cloudsmith
&lt;/h2&gt;

&lt;p&gt;For the purposes of this demonstration, we'll use the minimal crate created by &lt;code&gt;cargo init&lt;/code&gt;. You can initialise your new Cargo crate like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cargo init my-crate
     Created binary (application) package
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you take a look inside the new crate you'll see a few files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ tree my-crate/
my-crate/
├── Cargo.toml
└── src
    └── main.rs

1 directory, 2 files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;main.rs&lt;/code&gt; contains a simple "Hello World" program, and &lt;code&gt;Cargo.toml&lt;/code&gt; contains all configuration and setup data for your crate. For our purposes we can leave both files as-is.&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;cargo&lt;/code&gt; to build our crate and prepare it for upload to Cloudsmith:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd my-crate/
$ cargo package --allow-dirty
warning: manifest has no description, license, license-file, documentation, homepage or repository.
See &amp;lt;http://doc.crates.io/manifest.html#package-metadata&amp;gt; for more info.
   Packaging my-crate v0.1.0 (/Users/cloudsmith/my-crate)
   Verifying my-crate v0.1.0 (/Users/cloudsmith/my-crate)
   Compiling my-crate v0.1.0 (/Users/cloudsmith/my-crate/target/package/my-crate-0.1.0)
    Finished dev [unoptimized + debuginfo] target(s) in 1.45s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE: We use &lt;code&gt;--allow-dirty&lt;/code&gt; in the &lt;code&gt;cargo package&lt;/code&gt; command as we haven't committed the new crate to git. Under normal circumstances you'll just call cargo package without the extra flag.&lt;/p&gt;

&lt;p&gt;Cargo, by default, spits out your packaged crate under the &lt;code&gt;target/package/&lt;/code&gt; directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -l target/package/
total 4
drwxr-xr-x 6 cloudsmith cloudsmith 192 Apr 30 16:09 my-crate-0.1.0
-rw-r--r-- 1 cloudsmith cloudsmith 673 Apr 30 16:09 my-crate-0.1.0.crate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once built you can push the crate to Cloudsmith using the &lt;a href="https://pypi.org/project/cloudsmith-cli/" rel="noopener noreferrer"&gt;Cloudsmith CLI&lt;/a&gt;. We don't yet support pushing crates with &lt;code&gt;cargo publish&lt;/code&gt;, but we'll be adding support in a future release (if you want it, please let us know). For now, use the CLI.&lt;/p&gt;

&lt;p&gt;First, ensure you've installed the Cloudsmith CLI and configured authentication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install cloudsmith-cli
$ export CLOUDSMITH_API_KEY=xxxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, use the CLI to push the crate, which operates like &lt;code&gt;cargo publish&lt;/code&gt; but is specific to Cloudsmith:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cloudsmith push cargo my-org/my-repo target/package/my-crate-0.1.0.crate

Checking cargo package upload parameters ... OK
Checking my-crate-0.1.0.crate file upload parameters ... OK
Requesting file upload for my-crate-0.1.0.crate ... OK
Creating a new cargo package ... OK
Created: my-org/my-repo/my-crate-010crate (ffb4n20QxSYM)

Synchronising my-crate-010crate:  [####################################]  100%  Sync Completed / Fully Synchronised
Package synchronised successfully!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your repository should now contain the uploaded crates. An example of which is our official Cloudsmith examples repository (this is where we upload &lt;a href="https://github.com/cloudsmith-io/cloudsmith-examples" rel="noopener noreferrer"&gt;our examples&lt;/a&gt; from), as shown below:&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%2Fuploads%2Farticles%2Fqymqj2y9af27ubucwbo9.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%2Fuploads%2Farticles%2Fqymqj2y9af27ubucwbo9.png" width="800" height="531"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once pushed, your crate is ready for installation with Cargo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installing your Cargo crates from Cloudsmith
&lt;/h2&gt;

&lt;p&gt;First, we need to tell Cargo how to access the registry. To do so you need to add the following entry in your &lt;code&gt;.cargo/configfile&lt;/code&gt; (replace &lt;code&gt;TOKEN&lt;/code&gt; with an entitlement token, which is a type of read-only authentication token that we support):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[registries]
cloudsmith = { index = "https://dl.cloudsmith.io/TOKEN/my-org/my-repo/cargo/index.git" }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then install the crate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cargo install my-crate --registry cloudsmith
    Updating `https://dl.cloudsmith.io/TOKEN/my-org/my-repo/cargo/index.git` index
  Downloaded my-crate v0.1.0 (registry `https://dl.cloudsmith.io/TOKEN/my-org/my-repo/cargo/index.git`)
  Downloaded 1 crates (673 B) in 0.54s
  Installing my-crate v0.1.0 (registry `https://dl.cloudsmith.io/TOKEN/my-org/my-repo/cargo/index.git`)
   Compiling my-crate v0.1.0 (registry `https://dl.cloudsmith.io/TOKEN/my-org/my-repo/cargo/index.git`)
    Finished release [optimized] target(s) in 2.60s
  Installing /Users/cloudsmith/.cargo/bin/my-crate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Assuming &lt;code&gt;~/.cargo/bin/my-crate&lt;/code&gt; is on your &lt;code&gt;$PATH&lt;/code&gt; then you should be able to run the installed program:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ my-crate
Hello, world!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It really is that simple, and now you've sourced a crate privately from your very own private Cargo registry on Cloudsmith. Well done!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Rust is an exciting new programming language, with many interesting properties that make it perfect for use in a wide range of scenarios. Cargo provides a robust suite of tools for installing, configuring and managing dependencies for your Rust projects.&lt;/p&gt;

&lt;p&gt;Cloudsmith provides fully featured Cargo registries on all plans, flexible enough for use whether you’re hosting public crates for a public or open source project, or private crates for your company’s internal needs. We're extremely proud to be able to support the Rust ecosystem with this first (non-official) implementation of public and private Cargo registries.&lt;/p&gt;

&lt;p&gt;You can find further, context-specific information, including detailed setup and integration instructions inside each Cloudsmith repository. You can see an example of this documentation in our &lt;a href="https://cloudsmith.io/~cloudsmith/repos/examples/setup/#formats-cargo" rel="noopener noreferrer"&gt;public examples repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Why wait? Get your public and private Cargo registry hosting at &lt;a href="https://cloudsmith.io/l/cargo-repository" rel="noopener noreferrer"&gt;Cloudsmith&lt;/a&gt; now.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>rust</category>
      <category>cargo</category>
      <category>devops</category>
    </item>
    <item>
      <title>Cloudsmith + Helm</title>
      <dc:creator>Alan Carson</dc:creator>
      <pubDate>Wed, 17 Apr 2019 14:31:26 +0000</pubDate>
      <link>https://forem.com/cloudsmith/cloudsmith-helm-m45</link>
      <guid>https://forem.com/cloudsmith/cloudsmith-helm-m45</guid>
      <description>&lt;p&gt;TL;DR: Cloudsmith provides public and private Helm repository hosting, with ultra-fast and secure delivery of your Helm charts; for the ultimate in integration with the Kubernetes (k8s) ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Helm - What Is It?
&lt;/h2&gt;

&lt;p&gt;Kubernetes has quickly become one of the most popular container orchestration platforms used by development and operations teams all over the world. It was open-sourced by Google in 2014, built based on years of learning deploying containers at scale inside the search giant.&lt;/p&gt;

&lt;p&gt;Despite Kubernetes’ rapid rise to popularity, deploying and managing applications can be a complex and daunting task, often requiring the operator to write and configure multiple inter-dependent configuration files for various parts of the systems being deployed. As our applications become more complex, more distributed, the difficulty of managing them grows even further.&lt;/p&gt;

&lt;p&gt;Originally built by Deis (later acquired by Microsoft), Helm is a package manager for Kubernetes that allows development and operations teams to easily manage and deploy these increasingly complex cloud native applications to their Kubernetes clusters. Helm allows you to manage applications on your Kubernetes cluster in much the same way as you’d manage applications on your Linux server with &lt;code&gt;apt&lt;/code&gt; or &lt;code&gt;yum&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Helm works by packaging up a set of YAML definitions along with the necessary configuration to quickly stand up all components of an application in a repeatable way. A single chart can be as simple or complex as necessary, deploying anything from a single container to a full distributed application. Helm combines these application definitions with user-provided configuration to allow simple overriding of configuration where needed, allowing users to concentrate on shipping software and not on the nitty-gritty of configuring every application they need to run.&lt;/p&gt;

&lt;p&gt;Helm packages are known as “Charts” and are stored in a “Chart Repository”. By default, Helm comes bundled with the “stable” chart repository, hosted for free by Google. Most public charts are hosted here, mostly provided by vendors packaging their own software for use by others.&lt;/p&gt;

&lt;p&gt;See also:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Helm Documentation: &lt;a href="https://helm.sh/docs" rel="noopener noreferrer"&gt;https://helm.sh/docs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kubernetes Documentation: &lt;a href="https://kubernetes.io/docs/" rel="noopener noreferrer"&gt;https://kubernetes.io/docs/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting Started With Helm
&lt;/h2&gt;

&lt;p&gt;The main requirement for using Helm is a working Kubernetes installation. Setup of Kubernetes is outside the scope of this post, but you can get started locally an with installation of &lt;a href="https://kubernetes.io/docs/setup/minikube/" rel="noopener noreferrer"&gt;minikube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once &lt;a href="https://helm.sh/docs/using_helm/#installing-helm" rel="noopener noreferrer"&gt;installed&lt;/a&gt; you can initialise Helm on your cluster:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install &lt;a href="https://helm.sh/docs/glossary/#tiller" rel="noopener noreferrer"&gt;Tiller&lt;/a&gt;, Helm’s server-side component, responsible for interacting with the Kubernetes API and managing state.&lt;/p&gt;

&lt;p&gt;You can then run other Helm commands as needed. To view all available charts you can use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm search
NAME                                            CHART VERSION   APP VERSION                     DESCRIPTION
stable/acs-engine-autoscaler                    2.2.2           2.1.1                           DEPRECATED Scales worker nodes within agent pools
stable/aerospike                                0.2.3           v4.5.0.5                        A Helm chart for Aerospike in Kubernetes
stable/airflow                                  2.4.0           1.10.0                          Airflow is a platform to programmatically author, schedul...
stable/ambassador                               2.0.1           0.52.0                          A Helm chart for Datawire Ambassador
stable/anchore-engine                           0.12.1          0.3.3                           Anchore container analysis and policy evaluation engine s...
stable/apm-server                               1.0.0           6.6.2                           The server receives data from the Elastic APM agents and ...
stable/ark                                      4.1.0           0.10.1                          A Helm chart for ark
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a full listing of the built-in “stable” repository which contains all supported public charts. You can install any of the charts from the &lt;code&gt;helm&lt;/code&gt; CLI also:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm install stable/dokuwiki
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instructs Tiller to pull the packaged chart from the stable repository, render all the templates contained within, and apply those to the running cluster. You can inspect the status of the application with regular Kubernetes CLI tooling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pods
NAME                                                 READY     STATUS    RESTARTS   AGE
lopsided-cheetah-dokuwiki-85c96f777d-gskjn           1/1       Running   0          13d

$ kubectl get deployments
NAME                                 DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
lopsided-cheetah-dokuwiki            1         1         1            1           13d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or check the status of the chart installation itself using the &lt;code&gt;helm&lt;/code&gt; CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm list
NAME                    REVISION        UPDATED                         STATUS          CHART                           APP VERSION             NAMESPACE
lopsided-cheetah        1               Mon Mar 25 17:16:56 2019        DEPLOYED        dokuwiki-4.2.0                  0.20180422.201901061035 default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Managing Helm With Cloudsmith
&lt;/h2&gt;

&lt;p&gt;If using only public charts to install third-party applications, then the above instructions are enough to get started in most cases. But if you want to install software for which there are no public charts, whether your own or third-party, you can create your own chart and host it using Cloudsmith.&lt;/p&gt;

&lt;p&gt;If you’re creating your own chart, you can use one of Helm’s starter templates to quickly scaffold out the directory for you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm create my-chart-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a &lt;code&gt;my-chart-name&lt;/code&gt; folder containing all the files and folders necessary to build your chart. You can adjust the templates as needed for your application, &lt;a href="https://helm.sh/docs/chart_template_guide/" rel="noopener noreferrer"&gt;The Chart Template Developer’s Guide&lt;/a&gt; is a really useful resource when building your own chart.&lt;/p&gt;

&lt;p&gt;Once you’ve finished adjusting your templates, you can create a Chart package with the CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm package my-chart-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Successfully packaged chart and saved it to: /home/me/my-chart-name-1.0.tgz&lt;br&gt;
Once built you can push the chart to Cloudsmith. First, ensure you’ve installed the Cloudsmith CLI and configured authentication:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install cloudsmith-cli
$ export CLOUDSMITH_API_KEY=xxxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, use the Cloudsmith CLI to push the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cloudsmith push helm my-org/my-repo my-chart-name-1.0.tgz
Checking helm package upload parameters ... OK
Checking my-chart-name-1.0.tgz file upload parameters ... OK
Requesting file upload for my-chart-name-1.0.tgz ... OK
Creating a new helm package ... OK
Created: my-org/my-repo/my-chart-name-10tgz (...)

Synchronising my-chart-name-10tgz:  [####################################]  100%  Sync Completed / Fully Synchronised
Package synchronised successfully!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once pushed, you can configure Helm to install packages from your 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;$ helm repo add cloudsmith 'https://dl.cloudsmith.io/TOKEN/my-org/my-repo/helm/charts/'
$ helm repo update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then install your application to Kubernetes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ helm install cloudsmith/my-chart-name
&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%2Fuploads%2Farticles%2Fmsjpecin63yu5mli2put.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%2Fuploads%2Farticles%2Fmsjpecin63yu5mli2put.PNG" alt="Cloudsmith Helm Screenshot" width="800" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After pushing Helm charts to Cloudsmith, you'll see something like this in your repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Helm is a powerful tool to help manage the ever-growing complexity of deploying and running cloud native applications on Kubernetes. Like other package managers Helm provides a robust suite of tools for installing, configuring and managing applications on its target platform, Kubernetes.&lt;/p&gt;

&lt;p&gt;Cloudsmith provides fully featured Helm repositories on all plans, flexible enough for use whether you’re hosting public charts for an open source project, or private charts for your company’s internal applications.&lt;/p&gt;

&lt;p&gt;You can find further, context-specific information, including detailed setup and integration instructions inside each Cloudsmith repository. You can see an example of this documentation in our &lt;a href="https://cloudsmith.io/~cloudsmith/repos/examples/setup/#formats-helm" rel="noopener noreferrer"&gt;public examples repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Why wait? Get your public and private Helm repository hosting at &lt;a href="https://cloudsmith.io/l/helm-repository" rel="noopener noreferrer"&gt;Cloudsmith&lt;/a&gt; now.&lt;/p&gt;

</description>
      <category>cloudsmith</category>
      <category>helm</category>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
