<?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>DEV Community: Aayush Mamgain</title>
    <description>The latest articles on DEV Community by Aayush Mamgain (@coderaayush).</description>
    <link>https://dev.to/coderaayush</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%2F354329%2F12ba8ab9-0c2a-4b7a-9955-fb67506a4853.png</url>
      <title>DEV Community: Aayush Mamgain</title>
      <link>https://dev.to/coderaayush</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/coderaayush"/>
    <language>en</language>
    <item>
      <title>Get your DigitalOcean Billing Info in Slack with Nimbella Commander</title>
      <dc:creator>Aayush Mamgain</dc:creator>
      <pubDate>Mon, 23 Mar 2020 13:02:04 +0000</pubDate>
      <link>https://dev.to/coderaayush/get-your-digitalocean-billing-info-in-slack-with-nimbella-commander-2njh</link>
      <guid>https://dev.to/coderaayush/get-your-digitalocean-billing-info-in-slack-with-nimbella-commander-2njh</guid>
      <description>&lt;p&gt;Have you ever wanted an easy way of displaying your DigitalOcean billing info on Slack? With &lt;a href="https://nimbella.com/product/commander"&gt;Nimbella Commander&lt;/a&gt;, you can have your current bill and next month's projected bill displayed using one command to your &lt;a href="https://nimbella.com/slack/"&gt;Slack workspace&lt;/a&gt;. This conveniently integrated DigitalOcean billing functionality will allow developers to have cost-visibility without having to navigate complex billing systems, which will benefit the entire organization in the long run.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lYAvHVdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b1vcirs7d5g0eoaybos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lYAvHVdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b1vcirs7d5g0eoaybos.png" alt="DigitalOcean bill in slack with monthly projections"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By following these 7 simple steps, you can add Nimbella Commander to Slack and set it up for running this DigitalOcean billing command. Later on, I'll show you how to restrict the access for this command, so that it is available only for the relevant people within your Slack workspace.&lt;/p&gt;




&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Goto your &lt;a href="https://cloud.digitalocean.com/account/api/tokens"&gt;DigitalOcean's API&lt;/a&gt; section and generate a new token with the name of &lt;strong&gt;digitaloceanApiKey&lt;/strong&gt;. Copy this API token, you will be required to use this later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2Hb9tgBX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2vvq0p95t6k37aarkckd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2Hb9tgBX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2vvq0p95t6k37aarkckd.png" alt="DigitalOcean API Key setup page"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Add Nimbella Commander to your Slack workspace. Search 'Nimbella Commander' in Slack's app search section and proceed with it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--evErFHIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/opaftebi6veoeh0ixem9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--evErFHIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/opaftebi6veoeh0ixem9.png" alt="Add Nimbella Commander app in Slack"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, You can visit &lt;a href="https://nimbella.com/"&gt;our official website&lt;/a&gt; and click the "Add to Slack" button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kznC6vm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0lbnps5c4uejl1056gq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kznC6vm---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0lbnps5c4uejl1056gq.png" alt="Nimbella Commander app add to slack via direct link"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;In order to get your DigitalOcean billing details, you'll need to install the &lt;a href="https://github.com/nimbella/command-sets/tree/master/billing"&gt;billing Command Set&lt;/a&gt; into your Nimbella app. Command Sets are a packaging specification for Slack commands, and a convenient way to share commands via GitHub or open source. Type &lt;strong&gt;/nc csm_install billing&lt;/strong&gt; in your slack's channel or direct message.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/nc csm_install billing&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jnxpIkBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5n2q5n65eox6f6gbfapi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jnxpIkBW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5n2q5n65eox6f6gbfapi.png" alt="Nimbella Commander DigitalOcean billing commandset"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Next, we need to bind some secrets to the billing commands. Specifically, the API keys you generated earlier for the DigitalOcean API will be encrypted (outside of Slack) and attached to the slash command. To do this, type &lt;strong&gt;/nc secret_create&lt;/strong&gt; to bring up the Nimbella Secret Creator. We're creating the secrets outside of Slack so that Slack will only see encrypted strings and not your API keys.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/nc secret_create&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When you run the secrets command, you will see an output that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R28cggyD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n7io86bttk7n3aqe5ppi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R28cggyD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n7io86bttk7n3aqe5ppi.png" alt="Nimbella Commander secret creator command"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Click on the Secret Creator link to be redirected to the page which encrypts your API keys.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fMlzxe6Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kxhd5lao39p2i5bfzztl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fMlzxe6Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kxhd5lao39p2i5bfzztl.png" alt="Nimbella Commander api key  setup page"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Add your Digital Ocean API Key and from Step 1 to the field in the Secret Creator as illustrated in the following figure. Next, click the "Make Secrets" button to generate the commands you'll need to copy and paste into your Slack workspace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7T4BUKVk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bcg4qwm0ecin1ajfnkj0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7T4BUKVk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bcg4qwm0ecin1ajfnkj0.png" alt="Nimbella Commander secrets encryption page"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;After clicking the "Make Secrets" button, the command you'll need to run on your Slack page will appear. Copy the command paste them into Slack. This will take your API Key to apply them to your Nimbella app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PxmuMM9g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1r9sgof5gjsn4pxye1zd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PxmuMM9g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1r9sgof5gjsn4pxye1zd.png" alt="Nimbella Commander secret add command"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Finally, run the billing Command Set's command &lt;strong&gt;/nc dobill&lt;/strong&gt; to see your DigitalOcean billing info.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/nc dobill&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lYAvHVdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b1vcirs7d5g0eoaybos.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lYAvHVdJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0b1vcirs7d5g0eoaybos.png" alt="DigitalOcean bill in slack with monthly projections"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;You likely don't want everyone in your Slack team to run this command. Nimbella Commander offers a neat feature to allow only certain users to run specific commands. For example, you can restrict access to the DigitalOcean billing command to specific users using &lt;strong&gt;/nc command_runners dobill + @user1 + @user2&lt;/strong&gt;, substituting for &lt;strong&gt;"user1"&lt;/strong&gt; and &lt;strong&gt;"user2"&lt;/strong&gt; the Slack names of your teammates that should have access to the DigitalOcean billing details.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nc command_runners dobill + @user1 + @user2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GZ14QUzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pjfpkp2tazssmnze6yfl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GZ14QUzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pjfpkp2tazssmnze6yfl.png" alt="Nimbella commander command runner setup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's worth also mentioning that you have access to an audit trail to see who's run your commands. This is useful for administrators and team oversight where appropriate. Type &lt;strong&gt;/nc command_log dobill&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/nc command_log dobill&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DboQNLd2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ridyurr9fevdc4fmje8w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DboQNLd2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ridyurr9fevdc4fmje8w.png" alt="Nimbella commander command log output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One last thing that's important to know is that the code for the dobill command you import into Commander is yours to edit. If you type &lt;strong&gt;/nc command_code dobill&lt;/strong&gt;, you will receive a secure link that will allow you to edit the command.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/nc command_code dobill&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kr96Sjmt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a98live7r14q1euuhm5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kr96Sjmt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a98live7r14q1euuhm5b.png" alt="Nimbella commander code edit for digitalocean bill commandset"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Nimbella's access control you can also limit who can view and edit the code that implements a particular command as well. The built-in Secret Creator means your sensitive data remains outside of Slack and accessible only to the code you run. And with Audit Logs, you have accountability and historical data readily available at your fingertips. These are powerful features of the Commander that don't exist in Slack otherwise. For more information about Commander, &lt;a href="https://nimbella.com/product/commander"&gt;visit our website&lt;/a&gt;. We'd also love to hear from you via our community &lt;a href="https://app.slack.com/client/TL64TJWVB/DTK6BBZGD"&gt;Slack channel&lt;/a&gt; or on &lt;a href="https://github.com/nimbella/command-sets"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you wish to add Commander to your Slack account, then &lt;a href="https://github.com/nimbella/command-sets"&gt;click this link to get started&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>slack</category>
      <category>servers</category>
      <category>digitalocean</category>
    </item>
  </channel>
</rss>
