<?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: Jacques Patricks</title>
    <description>The latest articles on DEV Community by Jacques Patricks (@cocteau).</description>
    <link>https://dev.to/cocteau</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%2F485151%2Ff87424f9-d17d-4da6-9e62-4809a276213b.jpg</url>
      <title>DEV Community: Jacques Patricks</title>
      <link>https://dev.to/cocteau</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cocteau"/>
    <language>en</language>
    <item>
      <title>Locally Deploy Rasa X On a Linux Azure Virtual Machine</title>
      <dc:creator>Jacques Patricks</dc:creator>
      <pubDate>Fri, 08 Jan 2021 13:41:52 +0000</pubDate>
      <link>https://dev.to/cocteau/locally-deploy-rasa-x-on-a-linux-azure-machine-1ffp</link>
      <guid>https://dev.to/cocteau/locally-deploy-rasa-x-on-a-linux-azure-machine-1ffp</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;You have already built your assistant locally using Rasa open source. Well, deriving from Rasa Docs installation guide for Rasa X you have decided Server Quick-Install is your best preference as it is the simplest and quickest.&lt;/p&gt;

&lt;p&gt;Two things - yes it is simple and quick.&lt;/p&gt;

&lt;p&gt;You have also chosen Microsoft Azure as your cloud provider to host your Linux Virtual Machine. One thing - it is damn quick! Here is how to make it simple even when you stick to the terminal and have no idea how to engage an Azure Cloud Shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Azure Portal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Adhere to these Requirements: &lt;a href="https://rasa.com/docs/rasa-x/installation-and-setup/install/quick-install-script#requirements"&gt;https://rasa.com/docs/rasa-x/installation-and-setup/install/quick-install-script#requirements&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Linux terminal&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Create a Linux VM
&lt;/h3&gt;

&lt;p&gt;In the dashboard of your Azure portal, under Azure services:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Click Create a resource. Select Compute and choose Virtual Machine. You should be able to see basic configurations for a fresh VM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under Basics, configure a new Resource group that is unique, a Virtual machine name, your Region and choose your Linux image. In my case, Ubuntu Server 18.04 LTS - Gen1 as of writing this article.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You should be careful to select the recommended Size of vCPU as specified in Rasa Docs. Make sure SSH public key is your Authentication type to enable generation of a new key pair.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Allow Public inbound ports for selected ports SSH (22), HTTP (80), HTTPS (443). This will allow IP addresses to access your virtual machine. You can confirm this while defining your network connectivity of your VM that the selected inbound ports are allowed. Proceed to create your VM.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: SSH into your Linux VM
&lt;/h3&gt;

&lt;p&gt;SSH is an encrypted connection protocol that will allow you to securely sign-in over unsecured connections. The public-private key pair is like the lock on your door. The public key (lock) is exposed to anyone with the right key (private key). Give it to people you trust.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The public key is placed on your Linux VM when you create the VM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The private key remains on your local machine.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The VM tests the SSH client to make sure it has the correct private key when you want to connect to your Linux VM.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open a terminal in your PC and access your working directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Login to your Azure Portal from your working directory:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;$ Az login&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSH to your VM with an SSH client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;$ ssh &lt;a href="mailto:azureuser@myvm.southafricanorth.cloudapp.azure.com"&gt;azureuser@myvm.southafricanorth.cloudapp.azure.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Replace with admin user name and the fully qualified domain name, and IP address/DNS name&lt;/p&gt;

&lt;p&gt;In case you have misplaced your generated keypair or encountered &lt;strong&gt;&lt;em&gt;Permission Error&lt;/em&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generate key value pairs to an already created VM as follows:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;$ ssh-keygen -m PEM -t rsa -b 4096&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the public key for reset&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;$ cat ~/.ssh/id_rsa.pub&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On your Azure Portal, open your Linux Virtual Machine and paste your public key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Support + Troubleshooting &amp;gt;&amp;gt;&amp;gt; Reset password &amp;gt;&amp;gt;&amp;gt; Reset SSH&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can now proceed to ssh into you Linux VM with your new keypairs&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Customize and Deploy Rasa X
&lt;/h3&gt;

&lt;p&gt;You should be connected to your virtual machine at this point. Therefore, you could proceed to customize a few settings for your deployment:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$ export INITIAL_USER_PASSWORD="my-safe-password"&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;$ export RASA_X_VERSION=0.34.0&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;$ export ENABLE_DUCKLING=True&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;$ curl -s get-rasa-x.rasa.com | sudo -E bash&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When done, the script will print the URL to access Rasa X:&lt;/p&gt;

&lt;p&gt;You can now access Rasa X on this URL: &amp;lt;--URL--&amp;gt;&lt;/p&gt;

&lt;p&gt;Rasa X is deployed locally on your server!&lt;/p&gt;

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

&lt;p&gt;We have learnt that a key step to achieve quick install on Azure VMs is highly dependent on how you configure your network connectivity to allow inbound ports and finally SSH-ing into your Linux VM. Be careful about root permissions especially in your working directory. Rasa X can also be deployed on a cluster environment to have more control while customizing your deployment.&lt;/p&gt;

&lt;p&gt;As a next step, add a custom action server and eventually an Integrated Version Control to connect your Github repository. Happy Rasa X deployment!&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rasa.com/docs/rasa-x/"&gt;https://rasa.com/docs/rasa-x/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rasa.com/docs/rasa-x/installation-and-setup/deploy"&gt;https://rasa.com/docs/rasa-x/installation-and-setup/deploy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys"&gt;https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mac-create-ssh-keys&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Bonjour le monde, j'suis Jacques du Kenya</title>
      <dc:creator>Jacques Patricks</dc:creator>
      <pubDate>Thu, 08 Oct 2020 08:25:06 +0000</pubDate>
      <link>https://dev.to/cocteau/bonjour-le-monde-j-suis-jacques-du-kenya-58pf</link>
      <guid>https://dev.to/cocteau/bonjour-le-monde-j-suis-jacques-du-kenya-58pf</guid>
      <description></description>
    </item>
  </channel>
</rss>
