<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="http://badzilla.co.uk/">
  <channel>
    <title>Go</title>
    <link>http://badzilla.co.uk/</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Connect Robo 3T to MongoDB via Vagrant Ubuntu VM</title>
  <link>http://badzilla.co.uk/connect-robo-3t-mongodb-vagrant-ubuntu-vm</link>
  <description>
&lt;span&gt;Connect Robo 3T to MongoDB via Vagrant Ubuntu VM&lt;/span&gt;

&lt;span&gt;&lt;span lang="" about="http://badzilla.co.uk/user/1" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;nigel&lt;/span&gt;&lt;/span&gt;

&lt;span&gt;Sun, 14/04/2019 - 09:50&lt;/span&gt;

      &lt;div class="field field--name-field-heading-image-text field--type-entity-reference-revisions field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;  &lt;div class="paragraph paragraph--type--blog-heading-picture-text paragraph--view-mode--default"&gt;
          
      &lt;div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;    &lt;img srcset="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.27.55.png?itok=-XAUlNg2 325w, https://assets.badzilla.co.uk/s3fs-public/styles/max_650x650/public/2019-04/Screenshot%202019-04-14%20at%2010.27.55.png?itok=tVJdLhu4 650w, https://assets.badzilla.co.uk/s3fs-public/styles/max_1300x1300/public/2019-04/Screenshot%202019-04-14%20at%2010.27.55.png?itok=-tC_lvzU 1300w, https://assets.badzilla.co.uk/s3fs-public/styles/max_2600x2600/public/2019-04/Screenshot%202019-04-14%20at%2010.27.55.png?itok=bspebmpe 1990w" sizes="(min-width: 1290px) 1290px, 100vw" src="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.27.55.png?itok=-XAUlNg2" alt="Robo 3T" typeof="foaf:Image" class="img-responsive" /&gt;


&lt;/div&gt;
          &lt;/div&gt;
  
            &lt;div class="field field--name-field-blog-text field--type-text-long field--label-hidden field--item"&gt;&lt;p&gt;I use a Mac for development &lt;em&gt;but&lt;/em&gt; I don't actually do my development on my Mac. I don't want to pollute my filesystem with a myriad of different programming languages and different versions of those languages. That can lead to instability. I chose to either use Docker containers or VMs within my Mac. This comes with its own problems - sometimes connectivity can be a problem.&lt;/p&gt;

&lt;p&gt;I am developing a Go web app on a Ubuntu 16.04 VM which is provisioned using Vagrant and an Ansible playbook. The app is using MongoDB as a document store. It's always useful to have a DB GUI to refer to during development. MySQL and Sequel Pro are a match made in heaven. In MongoDB land, the GUI of choice is Robo 3T (Formally Robomongo). Robo 3T is installed on my Mac (Host machine) - now how do I connect it to my Ubuntu VM (Guest machine)?&lt;/p&gt;&lt;/div&gt;
      
      &lt;/div&gt;
&lt;/div&gt;
              &lt;div class="field--item"&gt;  &lt;div class="paragraph paragraph--type--blog-heading-picture-text paragraph--view-mode--default"&gt;
          
            &lt;div class="field field--name-field-heading field--type-string field--label-hidden field--item"&gt;SSH Tunnel&lt;/div&gt;
      
      &lt;div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;    &lt;img srcset="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot_2019-04-14_at_10_02_46-edited.png?itok=7qpIJ8GP 325w, https://assets.badzilla.co.uk/s3fs-public/styles/max_650x650/public/2019-04/Screenshot_2019-04-14_at_10_02_46-edited.png?itok=KoLaJgaT 650w, https://assets.badzilla.co.uk/s3fs-public/styles/max_1300x1300/public/2019-04/Screenshot_2019-04-14_at_10_02_46-edited.png?itok=HWGVSMEL 1300w, https://assets.badzilla.co.uk/s3fs-public/styles/max_2600x2600/public/2019-04/Screenshot_2019-04-14_at_10_02_46-edited.png?itok=pwbdIix4 2138w" sizes="(min-width: 1290px) 1290px, 100vw" src="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot_2019-04-14_at_10_02_46-edited.png?itok=7qpIJ8GP" alt="Vagrant ssh-config" typeof="foaf:Image" class="img-responsive" /&gt;


&lt;/div&gt;
          &lt;/div&gt;
  
            &lt;div class="field field--name-field-blog-text field--type-text-long field--label-hidden field--item"&gt;&lt;p&gt;We will be using SSH Tunneling to gain access to the guest machine. Navigate to your project's folder on the host machine in a terminal. This is the directory which contains the Vagrantfile. Issue a &lt;strong&gt;vagrant ssh-config&lt;/strong&gt; command. This will give us the information to populate the Robo 3T configuration screens. &lt;/p&gt;&lt;/div&gt;
      
      &lt;/div&gt;
&lt;/div&gt;
              &lt;div class="field--item"&gt;  &lt;div class="paragraph paragraph--type--blog-heading-picture-text paragraph--view-mode--default"&gt;
          
            &lt;div class="field field--name-field-heading field--type-string field--label-hidden field--item"&gt;Robo 3T Connection - SSH Tab&lt;/div&gt;
      
      &lt;div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;    &lt;img srcset="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.12.24.png?itok=18zuGWte 325w, https://assets.badzilla.co.uk/s3fs-public/styles/max_650x650/public/2019-04/Screenshot%202019-04-14%20at%2010.12.24.png?itok=jXBGQlFW 650w, https://assets.badzilla.co.uk/s3fs-public/styles/max_1300x1300/public/2019-04/Screenshot%202019-04-14%20at%2010.12.24.png?itok=R2MxSQoN 1300w, https://assets.badzilla.co.uk/s3fs-public/styles/max_2600x2600/public/2019-04/Screenshot%202019-04-14%20at%2010.12.24.png?itok=17bQv6by 1318w" sizes="(min-width: 1290px) 1290px, 100vw" src="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.12.24.png?itok=18zuGWte" alt="SSH Tab" typeof="foaf:Image" class="img-responsive" /&gt;


&lt;/div&gt;
          &lt;/div&gt;
  
            &lt;div class="field field--name-field-blog-text field--type-text-long field--label-hidden field--item"&gt;&lt;p&gt;Open up Robo 3T and navigate to the SSH tab in Connections. Since we are using SSH tunneling, tick the checkbox at the top left of the form. Now you need to populate the rest of the fields. Perhaps counter-intuitively, the SSH address is always your Host, and therefore 127.0.0.1, and as per the Vagrant configuration posted earlier, the port is 2222. The user name is vagrant and we will be using the private key listed above. You'll note that directories starting with the dot file (hidden files) on a Mac aren't shown by default. So to find the .&lt;strong&gt;vagrant &lt;/strong&gt;directory, you will need the shift-cmd-dot keystroke combination. &lt;/p&gt;&lt;/div&gt;
      
      &lt;/div&gt;
&lt;/div&gt;
              &lt;div class="field--item"&gt;  &lt;div class="paragraph paragraph--type--blog-heading-picture-text paragraph--view-mode--default"&gt;
          
            &lt;div class="field field--name-field-heading field--type-string field--label-hidden field--item"&gt;Robo 3T Connection - Connection Tab&lt;/div&gt;
      
      &lt;div class="field field--name-field-blog-image field--type-image field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;    &lt;img srcset="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.20.48.png?itok=_Y7izpVE 325w, https://assets.badzilla.co.uk/s3fs-public/styles/max_650x650/public/2019-04/Screenshot%202019-04-14%20at%2010.20.48.png?itok=M4zZIkWM 650w, https://assets.badzilla.co.uk/s3fs-public/styles/max_1300x1300/public/2019-04/Screenshot%202019-04-14%20at%2010.20.48.png?itok=Kzn6JH2b 1300w, https://assets.badzilla.co.uk/s3fs-public/styles/max_2600x2600/public/2019-04/Screenshot%202019-04-14%20at%2010.20.48.png?itok=VtKScZAA 1314w" sizes="(min-width: 1290px) 1290px, 100vw" src="https://assets.badzilla.co.uk/s3fs-public/styles/max_325x325/public/2019-04/Screenshot%202019-04-14%20at%2010.20.48.png?itok=_Y7izpVE" alt="Connection Tab" typeof="foaf:Image" class="img-responsive" /&gt;


&lt;/div&gt;
          &lt;/div&gt;
  
            &lt;div class="field field--name-field-blog-text field--type-text-long field--label-hidden field--item"&gt;&lt;p&gt;Now go to the connection tab. I need a Direct Connection (and not a replica set) for my VM, and again the address should be your Host's 127.0.0.1. The port however is the default port used by MongoDB - 27017. Once this is done you should be in a position to click Test to check everything is ok. Save the configuration and you should now be able to open the connection to MongoDB and see something to my screen at the top of the page.&lt;/p&gt;&lt;/div&gt;
      
      &lt;/div&gt;
&lt;/div&gt;
          &lt;/div&gt;
  
      &lt;div class="field field--name-field-blog-youtube field--type-entity-reference-revisions field--label-hidden field--items"&gt;
              &lt;div class="field--item"&gt;  &lt;div class="paragraph paragraph--type--blog-text-youtube paragraph--view-mode--default"&gt;
          
      &lt;/div&gt;
&lt;/div&gt;
          &lt;/div&gt;
  
  &lt;div class="field field--name-field-blog-terms field--type-entity-reference field--label-inline"&gt;
    &lt;div class="field--label"&gt;blog terms&lt;/div&gt;
          &lt;span class="field__items"&gt;
              &lt;span class="field--item"&gt;&lt;a href="http://badzilla.co.uk/development" hreflang="en"&gt;Development&lt;/a&gt;&lt;/span&gt;
          &lt;span class="field--item"&gt;&lt;a href="http://badzilla.co.uk/go" hreflang="en"&gt;Go&lt;/a&gt;&lt;/span&gt;
              &lt;/span&gt;
      &lt;/div&gt;
</description>
  <pubDate>Sun, 14 Apr 2019 08:50:31 +0000</pubDate>
    <dc:creator>nigel</dc:creator>
    <guid isPermaLink="false">166 at http://badzilla.co.uk</guid>
    </item>

  </channel>
</rss>
