<?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: realninety5</title>
    <description>The latest articles on Forem by realninety5 (@realninety5).</description>
    <link>https://forem.com/realninety5</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%2F415594%2F7781b0c0-cb1f-45ca-b820-c815ba252a7f.png</url>
      <title>Forem: realninety5</title>
      <link>https://forem.com/realninety5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/realninety5"/>
    <language>en</language>
    <item>
      <title>How to deploy a Django Docker container to Elastic Beanstalk</title>
      <dc:creator>realninety5</dc:creator>
      <pubDate>Tue, 21 Feb 2023 13:44:28 +0000</pubDate>
      <link>https://forem.com/realninety5/how-to-deploy-a-django-docker-container-to-elastic-beanstalk-4bdj</link>
      <guid>https://forem.com/realninety5/how-to-deploy-a-django-docker-container-to-elastic-beanstalk-4bdj</guid>
      <description>&lt;p&gt;You can easily deploy your Django application to Elasticbeastlk (EB) by following these simple steps.&lt;/p&gt;

&lt;p&gt;Note, while creating your application, add&lt;br&gt;
Also ensure you have the Elastic Beanstalk cli 'eb' installed on your local machine.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.0.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to your ALLOWED_HOSTS in your application settings.py, also add this line&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os
live = os.getenv("LIVE")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add "live" to your ALLOWED_HOSTS too, we will update it with the URL elastic beanstalk will provide us later.&lt;/p&gt;

&lt;p&gt;Create a file with the list of requirements for the application to run by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip freeze &amp;gt; requirements.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create your Dockerfile&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
# the base image to run your application
FROM python:3.8.10-slim

# setup environment variable
ENV DockerHOME=/home/app/webapp

# set work directory
RUN mkdir -p $DockerHOME

# where your code lives
WORKDIR $DockerHOME

# set environment variables

# this ensures that the Python interpreter doesn’t generate .pyc files, we don't need them
ENV PYTHONDONTWRITEBYTECODE 1
# this will send python output straight to the terminal(standard output) without being buffered
ENV PYTHONUNBUFFERED 1

# install dependencies
RUN pip install --upgrade pip

# copy the whole project to your docker home directory.
COPY . $DockerHOME
# run this command to install all dependencies
RUN pip install -r requirements.txt
# port where the Django app runs
EXPOSE 5000
# start the server on port 5000, this is what EB listens for
CMD ["python", "manage.py", "runserver", "0.0.0.0:5000"]

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

&lt;/div&gt;



&lt;p&gt;On your local machine, you can test your EB deployment by running&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eb inti -p docker _application_name_
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and run it with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eb local run --port 5000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To deploy the application, run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eb create _environment_name_
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and follow the prompts&lt;/p&gt;

&lt;p&gt;When you are done, use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eb open
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to open the application&lt;/p&gt;

&lt;p&gt;If this tells you to add the URL to ALLOWED_HOSTS, copy the URL and add it to "software" with the name "live" (as we mentioned above) in "configuration" under the environment tab 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%2Fuploads%2Farticles%2Fhibf6xach8pjm4uns0lo.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%2Fhibf6xach8pjm4uns0lo.png" alt=" " width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>website</category>
    </item>
    <item>
      <title>How to deploy a Spring-boot jar file to ElasticBeanstalk</title>
      <dc:creator>realninety5</dc:creator>
      <pubDate>Tue, 21 Feb 2023 13:17:13 +0000</pubDate>
      <link>https://forem.com/realninety5/how-to-deploy-a-spring-boot-jar-file-to-elasticbeanstalk-4e01</link>
      <guid>https://forem.com/realninety5/how-to-deploy-a-spring-boot-jar-file-to-elasticbeanstalk-4e01</guid>
      <description>&lt;p&gt;Cloud has made procuring environments and deploying applications to them a lot easier than it used to be, providing us with different cloud deployments models like IaaS, Paas and Saas. Today we will look at the AWS ElasticBeanstalk, a PaaS (Platform as a Service) that provides us with a ready environment to deploy our applications.&lt;/p&gt;

&lt;p&gt;Elastic beanstalk nginx listens on port 5000 so, ensure to make your application listen on port 5000 by adding&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server:
   port: 5000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to your application.yaml file or by adding the key "SERVER_PORT" and the value "5000" to the software tab in the configuration tab of your environment on the elastic beanstalk.&lt;/p&gt;

&lt;p&gt;After developing your Spring-boot applications, run&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mvn install&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Go to aws' elastic beanstalk website and create a new application&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;enter the application’s name&lt;/li&gt;
&lt;li&gt;choose "java" as the platform and choose the java version your application is running on.&lt;/li&gt;
&lt;li&gt;click on "Upload your code" to select your packaged jar file and wait for the application to be deployed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can now click on the application URL provided by elastic beanstalk to access your application&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>design</category>
      <category>webdev</category>
      <category>socialmedia</category>
    </item>
    <item>
      <title>How to install Minikube on Ubuntu</title>
      <dc:creator>realninety5</dc:creator>
      <pubDate>Mon, 30 Jan 2023 08:06:19 +0000</pubDate>
      <link>https://forem.com/realninety5/how-to-install-minikube-on-ubuntu-236l</link>
      <guid>https://forem.com/realninety5/how-to-install-minikube-on-ubuntu-236l</guid>
      <description>&lt;p&gt;If you tried surfing the internet with the hope of finding how you can install minikube so you could run kubernetes locally, you might not find a complete approach on how to do that. This post guides you through what you need installed before you finally install minikube.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You will need to update and grade your system.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The -y allows the update without your prompt.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install socat, conntrack and apt-transport-https for networking between clusters
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install socat apt-transport-https conntrack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install curl if you don't have it
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install curl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Minikube needs a driver to run your cluster, it might be docker engine (container-based) or a virtualbox (Vm-based). This guide tells you how to install virtual box. You would still need to install docker engine as the runtime for your clusters anyway, so you might just want to install only docker engine using this &lt;a href="https://docs.docker.com/engine/install/ubuntu/"&gt;link&lt;/a&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install virtualbox virtualbox-ext-pack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow through and complete the installation of virtual box.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Finally, install minikube
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Test your installation.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;minikube version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>kubernetes</category>
      <category>minikube</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
