<?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:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jiuyu's Guide]]></title><description><![CDATA[HI! I’m Jiuyu, a student who is interested in information science and engineering, particularly with networks and cloud infrastructure.]]></description><link>https://blog.jiuyu.me</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1647943222623/qbPPw__pg.png</url><title>Jiuyu&apos;s Guide</title><link>https://blog.jiuyu.me</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 12:37:36 GMT</lastBuildDate><atom:link href="https://blog.jiuyu.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Accessing LAN Servers Over the Internet with ZeroTier without a Public IP]]></title><description><![CDATA[Local area networks (LAN) are a collection of devices within a limited area, usually a house or an institution such as a university. However, exposing devices on a LAN network can often pose security risks if improperly setup, or sometimes a public I...]]></description><link>https://blog.jiuyu.me/accessing-lan-servers-over-the-internet-with-zerotier-without-a-public-ip</link><guid isPermaLink="true">https://blog.jiuyu.me/accessing-lan-servers-over-the-internet-with-zerotier-without-a-public-ip</guid><category><![CDATA[dev]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[networking]]></category><category><![CDATA[uncategorized]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Mon, 14 Mar 2022 17:11:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647959594997/-0ZJ8RgNN.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Local area networks (LAN) are a collection of devices within a limited area, usually a house or an institution such as a university. However, exposing devices on a LAN network can often pose security risks if improperly setup, or sometimes a public IP address may not be available for your server/machine. Static IPs are also often note available for home internet connections, so in these cases, we can use virtual private networks to access LAN devices over the internet. SSH connections into your local server can also be vastly simplified using this method of virtual networks.</p>
<p>ZeroTier is a software-defined networking solution that allows access to a virtual LAN network over the internet, without having to expose ports to the public, and without need for a public IP address. This type of networking is sometimes know as intranet penetration, where we can use the ZeroTier servers to connect the server (which is LAN only) via the internet (with an ssh terminal etc.).</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949663150/6vfBb5rYo.svg+xml" alt /></p>
<p>Network Diagram of ZeroTier’s Virtual LAN</p>
<p>This is in stark contrast to how you’d usually connect to servers, where you’d have to <a target="_blank" href="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/">open ports</a> and such.</p>
<h2 id="heading-setting-up-zerotier">Setting Up ZeroTier</h2>
<p>In this tutorial, we’ll use a the scenario of a Windows computer remotely accessing an Ubuntu server, where the server only accepts LAN ssh connections, and is not exposed to the internet.</p>
<h3 id="heading-sign-up-to-zerotier">Sign Up to ZeroTier</h3>
<p>ZeroTier offers 4 plans and tiers, each with different types of support and max number of clients/admin accounts allowed.</p>
<ul>
<li><strong>Open Source</strong> – No limit on clients and admin accounts, but is self-hosted only</li>
<li><strong>Basic</strong> – Up to 50 network clients/members, 1 network admin</li>
<li><strong>Professional</strong> – Up to 500 network clients, 10 network admins and priority support</li>
<li><strong>Enterprise</strong> – No limit on clients and admin accounts, and the option for an SLA (service level agreement)</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949665746/nz2sIeTp1.png" alt /></p>
<p>ZeroTier Plans and Pricing</p>
<p>In our scenario above, we will only be needing the basic plan, or if self-hosting is an option for you, that could be the better choice. However, as our case only requires 2 network members (Windows machine and Ubuntu server), the <strong>basic plan</strong> will be more than enough (and saves the hassle of self-hosting)!</p>
<p>If you really wanted to self-host, a good option can be <a target="_blank" href="https://devblog.jiuyu.me/oracle-cloud-is-giving-away-free-virtual-machines/">Oracle Cloud’s</a> free tier, where you can get up to 6 VMs (2x AMD 1GB RAM, and 4x <a target="_blank" href="https://devblog.jiuyu.me/benchmarking-oracle-clouds-ampere-a1-arm-vms/">Ampere A1</a> 24GB total RAM).</p>
<p>Go ahead and sign up to <a target="_blank" href="https://www.zerotier.com/">ZeroTier</a>, and you’ll be lead to the control panel.</p>
<h3 id="heading-using-zerotier-to-setup-a-network">Using ZeroTier to Setup a Network</h3>
<p>Once you’re redirected to the dashboard, click on the Create a Network button to begin creating your first network.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949668344/yWseJGg-g.png" alt /></p>
<p>Create Network</p>
<p>Your network will appear in the list of networks, click on the name (in this case <code>pedantic_puskas</code>) to change its settings and add clients to the network.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949670488/eybHTatgg.png" alt /></p>
<p>New Network Added</p>
<p>Rename your network as you wish, and make sure to give it a fitting description. Scroll down and click on <strong>“Private”</strong>, if not already selected. This will ensure that the network cannot be accessed by unauthorised users, and will make sure that your server is safer against SSH attacks.</p>
<p>Scroll down more, and find the <strong>“Members”</strong> section. We see that no clients are connected to our network yet, so let’s add them now. Make a note of the 16 digit string after <strong>“join”</strong> in bold, this will be your <strong>Network ID</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949672205/_uMS4K3M07.png" alt /></p>
<p>No Members yet</p>
<h3 id="heading-installing-zerotier-on-clients">Installing ZeroTier on Clients</h3>
<blockquote>
<p><strong>Note</strong></p>
<p>Setting up the ZeroTier client on your LAN server will require SSH access, so make sure that you can remotely access the machine first.</p>
</blockquote>
<p>Go to the <a target="_blank" href="https://www.zerotier.com/download/">ZeroTier Downloads</a> site, and click on your operating system. Then, follow the instructions to install the ZeroTier client on your machine. For the LAN server, the bash script will work for Debian, Ubuntu, CentOS, RHEL, Fedora and other Linux distributions. The website also suggests using GPG keys to verify the package’s authenticity, which can be done to further secure your installation. Otherwise, SSL will work for most users.</p>
<h3 id="heading-setting-up-zerotiers-client">Setting Up ZeroTier’s Client</h3>
<h4 id="heading-windows">Windows</h4>
<p>Open ZeroTier on your Windows machine, right click on the tray icon and open the control panel. Here you’ll find a text box to input your network address, and enter in your 16-digit <strong>Network ID</strong> from before. Press on “Join Network”, and it will register in the list above.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949674143/cpWZT2CNOa.png" alt /></p>
<p>Adding the Network</p>
<p>You’ll see that there is no information next to the Network ID yet, and the down arrow menu shows “<code>ACCESS DENIED</code>“. This is because we created a private network, so we’ll have to allow this device onto our network before it can be used.</p>
<h5 id="heading-granting-access">Granting Access</h5>
<p>Go to your ZeroTier dashboard, and go to the “Members” section. You’ll see that the “Auth?” checkbox is not ticked, so tick that and go back to your ZeroTier control panel. The status will now be “OK”, and on the web control panel, under <strong>Members -&gt; Managed IPs</strong>, you’ll see that the machine has been allocated a local IP.</p>
<p>This IP will be the “local” IP of your machine on the ZeroTier virtual LAN network, and will be used to identify the computer on the network.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949676441/1c6tEgQs2.png" alt /></p>
<h3 id="heading-linux">Linux</h3>
<p>After installing ZeroTier using the script, add your server to the network using the following command:</p>
<pre><code>sudo zerotier<span class="hljs-operator">-</span>cli join <span class="hljs-operator">&lt;</span>your Network ID<span class="hljs-operator">&gt;</span>
</code></pre><p>And same as before, tick the “Auth?” checkbox on the web dashboard. Now you are set up on the ZeroTier virtual LAN network.</p>
<h2 id="heading-accesing-lan-devices-remotely-over-the-internet">Accesing LAN Devices Remotely Over the Internet</h2>
<p>If you wanted to SSH into your local home server, you would find the “Managed IP” of that device on the ZeroTier dashboard, and use it instead of your local IP. For example, if you usually SSH into your server via the IP 192.168.1.10, and your ZeroTier managed IP is 172.28.15.87, you’d use the 172.28.15.87 IP instead of 192.168.1.10.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949678614/DL24BrUep.png" alt /></p>
<p>Finding the Managed IP</p>
<p>In this case, you can even SSH into your machine without a public IP address, as the server is not facing the internet directly. Rather, it is through ZeroTier’s virtual networking.</p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/accessing-lan-devices-and-servers-over-the-internet-with-zerotier-without-a-public-ip-address/">Accessing LAN Servers Over the Internet with ZeroTier without a Public IP</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item><item><title><![CDATA[A Guide to Portainer Setup in Ubuntu Linux]]></title><description><![CDATA[Portainer is an extremely useful tool for managing Docker containers, be it a WordPress stack, a reverse proxy or even a custom DNS server! This guide will go through setting up Portainer on Ubuntu and all the necessary networking required to do so.
...]]></description><link>https://blog.jiuyu.me/a-guide-to-portainer-setup-in-ubuntu-linux</link><guid isPermaLink="true">https://blog.jiuyu.me/a-guide-to-portainer-setup-in-ubuntu-linux</guid><category><![CDATA[uncategorized]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Mon, 02 Aug 2021 03:51:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647959606519/0pqUYbPlq.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Portainer is an extremely useful tool for managing Docker containers, be it a WordPress stack, a reverse proxy or even a custom DNS server! This guide will go through setting up Portainer on Ubuntu and all the necessary networking required to do so.</p>
<p>Docker containers consist of runtimes that includes everything it needs – for example, for the official <a target="_blank" href="https://hub.docker.com/_/wordpress">WordPress image</a>, the container includes the Apache web server, and php, which are all needed to run WordPress standalone.</p>
<p>Portainer offers a GUI (Graphical User Interface) through a web interface, so you can start, reboot, stop and delete containers very easily. It also offers a very easy to use SSH client into the container, all <em>inside</em> the browser!</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ul>
<li>An instance running Canonical Ubuntu 18.04 LTS or later (20.04 will work)</li>
<li>SSH access into the Ubuntu instance</li>
</ul>
<h2 id="heading-installing-docker-and-docker-compose">Installing Docker and Docker-Compose</h2>
<h2 id="heading-install-docker-and-docker-compose">Install Docker and Docker-Compose</h2>
<h3 id="heading-update-and-upgrade">Update and Upgrade</h3>
<p>Make sure that you’re running the latest version of Ubuntu.</p>
<pre><code>sudo apt<span class="hljs-operator">-</span>get update <span class="hljs-operator">&amp;</span><span class="hljs-operator">&amp;</span> sudo apt<span class="hljs-operator">-</span>get upgrade
</code></pre><h3 id="heading-install-docker">Install Docker</h3>
<p>Now we’ll get onto the installation script, it’ll install Docker on your machine.</p>
<pre><code><span class="hljs-attribute">curl</span> -sSL https://get.docker.com | sh
</code></pre><h3 id="heading-install-docker-compose">Install Docker-Compose</h3>
<pre><code>sudo apt<span class="hljs-operator">-</span>get install libffi<span class="hljs-operator">-</span>dev libssl<span class="hljs-operator">-</span>dev
sudo apt install python3<span class="hljs-operator">-</span>dev
sudo apt<span class="hljs-operator">-</span>get install <span class="hljs-operator">-</span>y python3 python3<span class="hljs-operator">-</span>pip
</code></pre><blockquote>
<p>Sometimes you’ll get an error message <strong><em>“Package  has no installation candidate”</em></strong>, and an easy way to fix this is to reset your repository: (this will first make a backup of your old repository file then recreate a default version of it)</p>
</blockquote>
<pre><code>sudo mv <span class="hljs-operator">/</span>etc<span class="hljs-operator">/</span>apt<span class="hljs-operator">/</span>sources.list <span class="hljs-operator">~</span><span class="hljs-operator">/</span>
sudo touch <span class="hljs-operator">/</span>etc<span class="hljs-operator">/</span>apt<span class="hljs-operator">/</span>sources.list
</code></pre><p>Once python and python-pip has been installed, you can go ahead and install docker-compose.</p>
<pre><code><span class="hljs-attribute">sudo</span> pip<span class="hljs-number">3</span> install docker-compose
</code></pre><h3 id="heading-optional-add-docker-system-service-to-start-containers-at-boot">(Optional) Add Docker System Service to Start Containers at Boot</h3>
<p>This is a good addition, you can run the script below to enable start-up for Docker containers during system boot – this can prevent lots of downtime as the WordPress container will simply start up again in the event of a forced reboot.</p>
<pre><code>sudo systemctl <span class="hljs-keyword">enable</span> docker
</code></pre><h3 id="heading-test-that-docker-is-installed">Test that Docker is Installed</h3>
<p>First, run the following script to test that your Docker installation was successful.</p>
<pre><code><span class="hljs-attribute">docker</span> run hello-world
</code></pre><p>If it worked, it’ll display the following output:</p>
<pre><code>Hello <span class="hljs-keyword">from</span> Docker<span class="hljs-operator">!</span>
This message shows that your installation appears to be working correctly.

To generate <span class="hljs-built_in">this</span> message, Docker took the following steps:
 <span class="hljs-number">1.</span> The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the <span class="hljs-string">"hello-world"</span> image <span class="hljs-keyword">from</span> the Docker Hub.
    (arm64v8)
 <span class="hljs-number">3.</span> The Docker daemon created a <span class="hljs-keyword">new</span> container <span class="hljs-keyword">from</span> that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To <span class="hljs-keyword">try</span> something more ambitious, you can run an Ubuntu container with:
 $ docker run <span class="hljs-operator">-</span>it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https:<span class="hljs-comment">//hub.docker.com/</span>

For more examples and ideas, visit:
 https:<span class="hljs-comment">//docs.docker.com/get-started/</span>
</code></pre><h2 id="heading-installing-portainer">Installing Portainer</h2>
<p>Create the Portainer volume</p>
<pre><code>docker volume <span class="hljs-keyword">create</span> portainer_data
</code></pre><p>Run the Portainer container:</p>
<pre><code>docker run <span class="hljs-operator">-</span>d <span class="hljs-operator">-</span>p <span class="hljs-number">8000</span>:<span class="hljs-number">8000</span> <span class="hljs-operator">-</span>p <span class="hljs-number">9000</span>:<span class="hljs-number">9000</span> <span class="hljs-operator">-</span><span class="hljs-operator">-</span>name<span class="hljs-operator">=</span>portainer <span class="hljs-operator">-</span><span class="hljs-operator">-</span>restart<span class="hljs-operator">=</span>always <span class="hljs-operator">-</span>v <span class="hljs-operator">/</span><span class="hljs-keyword">var</span><span class="hljs-operator">/</span>run<span class="hljs-operator">/</span>docker.sock:<span class="hljs-operator">/</span><span class="hljs-keyword">var</span><span class="hljs-operator">/</span>run<span class="hljs-operator">/</span>docker.sock <span class="hljs-operator">-</span>v portainer_data:<span class="hljs-operator">/</span>data portainer<span class="hljs-operator">/</span>portainer
</code></pre><p>You should see the output below if it was successful:</p>
<pre><code><span class="hljs-attribute">latest</span>: Pulling from portainer/portainer
<span class="hljs-attribute">d1e017099d17</span>: Pull complete 
<span class="hljs-attribute">a7dca5b5a9e8</span>: Pull complete 
<span class="hljs-attribute">Digest</span>: sha<span class="hljs-number">256</span>:<span class="hljs-number">4</span>ae<span class="hljs-number">7</span>f<span class="hljs-number">14330</span>b<span class="hljs-number">56</span>ffc<span class="hljs-number">8728</span>e<span class="hljs-number">63</span>d<span class="hljs-number">355</span>bc<span class="hljs-number">4</span>bc<span class="hljs-number">7381417</span>fa<span class="hljs-number">45</span>ba<span class="hljs-number">0597</span>e<span class="hljs-number">5</span>dd<span class="hljs-number">32682901080</span>
<span class="hljs-attribute">Status</span>: Downloaded newer image for portainer/portainer:latest
<span class="hljs-attribute">2fd5f4a0883a9d358ad424fd963699445be8839f3e6a2cf73d55778bcc268523</span>
</code></pre><h2 id="heading-opening-ports-for-portainer">Opening Ports for Portainer</h2>
<p>Then, open port 9000 to access your portainer instance, follow this guide if you’re on Oracle Cloud, or check out the links below for AWS and Azure.</p>
<blockquote>
<p><a target="_blank" href="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/">How to Open Ports in Oracle Cloud</a></p>
</blockquote>
<iframe class="wp-embedded-content" sandbox="allow-scripts" src="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/embed/#?secret=ZR2Vb4wSqD#?secret=BMe4B6z2dj" width="600" height="338"></iframe>

<h3 id="heading-for-aws-ec2">For AWS EC2</h3>
<p>Follow these steps to do this:</p>
<ul>
<li>Open “<strong>Network &amp; Security</strong>” — Security Group settings are on the left-hand navigation</li>
<li>Find the security group connected to your instance</li>
<li>Choose “<strong>inbound rules</strong>”</li>
<li>Type the port number (in your case 8787) in “port range” then click “Add Rule”</li>
<li>Use the drop-down and add HTTP (port 80)</li>
</ul>
<p>And it is done.</p>
<p><em>From https://intellipaat.com/community/3700/how-to-open-a-web-server-port-on-ec2-instance</em></p>
<h3 id="heading-for-microsoft-azure-vms">For Microsoft Azure VMs</h3>
<p><a target="_blank" href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal">https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal</a></p>
<h2 id="heading-final-setup-with-portainer">Final Setup with Portainer</h2>
<p>Go to <strong>http://YOUR_SERVER_IP:9000</strong> to set up Portainer. You’ll then be prompted to set up any username and passwords for the admin account, so keep these details! Then, you can manage your containers through a web interface!</p>
<p>Happy coding!</p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/a-guide-to-portainer-setup-in-ubuntu-linux/">A Guide to Portainer Setup in Ubuntu Linux</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Benchmarking Oracle Cloud’s Ampere A1 ARM VMs]]></title><description><![CDATA[ARM CPUs have been all the craze for the past few months now, especially from the development of Apple’s M1 MacBook, which are power-efficient while still being really quite powerful. So, in this article, I’ll be benchmarking Oracle Cloud’s Ampere A1...]]></description><link>https://blog.jiuyu.me/benchmarking-oracle-clouds-ampere-a1-arm-vms</link><guid isPermaLink="true">https://blog.jiuyu.me/benchmarking-oracle-clouds-ampere-a1-arm-vms</guid><category><![CDATA[dev]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[ARM]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Fri, 30 Jul 2021 09:54:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647959641522/-dkatV_w8.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>ARM CPUs have been all the craze for the past few months now, especially from the development of Apple’s M1 MacBook, which are power-efficient while still being really quite powerful. So, in this article, I’ll be benchmarking Oracle Cloud’s Ampere A1 CPUs, to see how they hold up against more traditional offerings.</p>
<p>Oracle Cloud has been offering “Always Free” instances with up to 4 Ampere A1 ARM cores and 24 GB RAM – shareable among up to 4 virtual machines. So, I wondered, how do they stack up against AMD’s x86-64 more traditional offerings?</p>
<p>So, for this, I have chosen 2 instances from Oracle Cloud:</p>
<ul>
<li><strong>VM.Standard.E2.1.Micro</strong><ul>
<li>1 core of an <strong><em>AMD EPYC 7551 32-Core Processor</em></strong></li>
<li>1 GB RAM</li>
</ul>
</li>
<li><strong>VM.Standard.A1.Flex</strong><ul>
<li>1 core of an <strong><em>Ampere A1 CPU</em></strong></li>
<li>1 GB RAM</li>
</ul>
</li>
</ul>
<blockquote>
<p>Keep in mind that both instances are “Always Free” under Oracle Cloud services.</p>
</blockquote>
<p>Check out other instance “shapes” <a target="_blank" href="https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm">here</a>.</p>
<h2 id="heading-benchmarks">Benchmarks</h2>
<p>So, I ran Sysbench-CPU on both machines, using an unlimited number of threads for both. It is important here to note that AMD’s offering does allow for hyperthreading, so our 1 core is actually 2 logical threads. This feature is not available on the Ampere A1 CPU, so keep this in mind.</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/benchmark.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949693117/KZ_sqzGcD.png" alt /></a></p>
<p>We see that the Ampere A1 CPU beats the AMD alternative in every case, by a very large margin in all tests. In the 5000 max prime limit test, we see the A1 CPU having more than 6.5x the performance of the AMD CPU, and this is even seen in the higher max prime limits, where the A1 CPU is over 6 times the performance of the AMD offering.</p>
<p>Hence, based on this data from the benchmark, we can make the conclusion that A1 CPUs are miles ahead of AMD CPUs when it comes to this type of arbitrarily high intensity workload. However, keep in mind that the benchmarks here are NOT comprehensive, and only really cover one type of (truthfully) quite unrealistic workloads – so take these results with a grain of salt.</p>
<h2 id="heading-conclusionverdict">Conclusion/Verdict</h2>
<p>The Ampere CPUs are quite far ahead in the computational power provided per core, at least in the operations demanded by Sysbench. In benchmarks, the 6x performance of the A1 CPUs compared to the AMD CPUs offers great insight into the promise of ARM as the future of CPUs.</p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/benchmarking-oracle-clouds-ampere-a1-arm-vms/">Benchmarking Oracle Cloud’s Ampere A1 ARM VMs</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Oracle Cloud is Giving Away Free Virtual Machines (VPS)]]></title><description><![CDATA[Oracle cloud has introduced a new “Always Free” tier of virtual machines, with 2 always free x86-64 AMD EPYC-based instanced, with 1/8 OCPUs and 1 GB of RAM each, and an allowance of up to 4 ARM Ampere A1 cores, with 24 GB of RAM, shareable between u...]]></description><link>https://blog.jiuyu.me/oracle-cloud-is-giving-away-free-virtual-machines-vps</link><guid isPermaLink="true">https://blog.jiuyu.me/oracle-cloud-is-giving-away-free-virtual-machines-vps</guid><category><![CDATA[Cloud Computing]]></category><category><![CDATA[ARM]]></category><category><![CDATA[uncategorized]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Thu, 29 Jul 2021 13:17:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647959682703/kzaD9Eqj0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Oracle cloud has introduced a new “Always Free” tier of virtual machines, with <strong>2 always free x86-64 AMD EPYC-based instanced, with 1/8 OCPUs and 1 GB of RAM each</strong>, and an allowance of up to <strong>4 ARM Ampere A1 cores, with 24 GB of RAM, shareable between up to 4 instances</strong>.</p>
<p>Other “Always Free” tier items from Oracle Cloud include: <em>(from Oracle’s Website)</em></p>
<ul>
<li><strong>Infrastructure</strong><ul>
<li>2 Block Volumes Storage, 200 GB total.</li>
<li>10 GB Object Storage.</li>
<li>10 GB Archive Storage.</li>
<li>Resource Manager: managed Terraform.</li>
<li>5 OCI Bastions.</li>
</ul>
</li>
<li><strong>Databases</strong><ul>
<li>Your choice of Oracle Autonomous Transaction Processing, Autonomous Data Warehouse, Autonomous JSON Database, or APEX Application Development. Two databases total, each with 1 OCPU and 20 GB storage.</li>
<li>NoSQL Database with 133 million reads per month, 133 million writes per month, 25 GB storage per table, up to 3 tables.</li>
</ul>
</li>
<li><strong>Observability and Management</strong><ul>
<li>Monitoring: 500 million ingestion datapoints, 1 billion retrieval datapoints.</li>
<li>Application Performance Monitoring: 1000 tracing events per hour.</li>
<li>Logging: 10 GB per month.</li>
<li>Notifications: 1 million sent through https per month, 1000 sent through email per month.</li>
<li>Service Connector Hub: 2 service connectors.</li>
</ul>
</li>
<li><strong>Additional services</strong><ul>
<li>Flexible Load Balancer: 1 instance, 10 Mbps.</li>
<li>Flexible Network Load Balancer.</li>
<li>Outbound Data Transfer: 10 TB per month.</li>
</ul>
</li>
</ul>
<h2 id="heading-sign-up">Sign Up</h2>
<p>Sign up <a target="_blank" href="https://www.oracle.com/au/cloud/free/">here</a> and follow the instructions for sign up.</p>
<h2 id="heading-creating-a-new-instance">Creating a New Instance</h2>
<p>Click on the menu dropdown, navigate to the “Compute” tab and click on “Instances”</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-5-edited-1.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949702626/3MOTUI_F_.png" alt /></a></p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-6.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949704354/8Tb4aHjUn.png" alt /></a></p>
<p>Then, click on “Create Instance”</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-7.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949705731/lp5Uxx_DA.png" alt /></a></p>
<p>Under “Image and Shape”, configure your server to your liking.</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-9.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949706991/355tA8cjO.png" alt /></a></p>
<p>Click on “Change Image” to change your operating system – on the always free tier only Linux Distros can be selected.</p>
<p>Click on “Change Shape” to change your server’s configuration (specifications).</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-11.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949708282/CgtnczVjm.png" alt /></a></p>
<h3 id="heading-note-for-using-ampere-a1-arm-instances">Note for Using Ampere A1 ARM Instances</h3>
<p>Click on “Change Shape”, click on “Ampere” and select the VM.Standard.A1.Flex spec, with a “Always Free Eligible” tag next to it. Then, click on “Select Shape”.</p>
<p>Then, slide the sliders to configure your machine, remember, each account has a <strong>SHARED pool of 4 ARM CPUs and 24 GB of RAM.</strong></p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-12.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949710105/NBW6nMUdg.png" alt /></a></p>
<h3 id="heading-starting-your-instance">Starting Your Instance</h3>
<p>Click on “Save Private Key” under “Add SSH Keys”, keep this file as this is what you’ll need to connect to you instance later.</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-13.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949711840/UWu7-6yjD.png" alt /></a></p>
<p>Then click on “Create”</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-14.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949713204/c-a5Tcjjz.png" alt /></a></p>
<p>All done! You’ve set up your first Oracle Cloud VM instance!</p>
<h3 id="heading-connecting-to-the-instance">Connecting to the Instance</h3>
<p><a target="_blank" href="https://docs.rackspace.com/support/how-to/log-into-a-linux-server-with-an-ssh-private-key-on-windows/">Follow this guide here to find out more about connecting to your instance:</a></p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/oracle-cloud-is-giving-away-free-virtual-machines/">Oracle Cloud is Giving Away Free Virtual Machines (VPS)</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to Install a WordPress Docker Container on ARM]]></title><description><![CDATA[WordPress is the most popular content management system (CMS), with more than 64 million installations currently estimated. Its wide support for millions of themes, plugins and its open source license can help the web admin manage installations easil...]]></description><link>https://blog.jiuyu.me/how-to-install-a-wordpress-docker-container-on-arm</link><guid isPermaLink="true">https://blog.jiuyu.me/how-to-install-a-wordpress-docker-container-on-arm</guid><category><![CDATA[Docker]]></category><category><![CDATA[WordPress]]></category><category><![CDATA[uncategorized]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Thu, 29 Jul 2021 03:58:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1647959701576/Y3hj-qMHe.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>WordPress is the most popular content management system (CMS), with more than 64 million installations currently estimated. Its wide support for millions of themes, plugins and its open source license can help the web admin manage installations easily, allowing us to import and export sites very easily. And, unlike Wix or Squarespace, you’re not locked down in a proprietary system.</p>
<p>WordPress can run in a Docker container – Docker containers are like small, separate runtimes that run on a larger server. Docker containers can help you easily manage the installation.</p>
<p>P.S. You can get up to 4 instances of ARM architecture Ampere A1 virtual cloud instances over at Oracle cloud: <a target="_blank" href="https://www.oracle.com/au/cloud/free/">https://www.oracle.com/au/cloud/free/</a>. For all users, you can get up to 4 instances, sharing a total of 4 A1 ARM Cores, 24 GB RAM, and also 2 additional more traditional AMD EPYC x86-64 CPU-based versions, each with 1/8 OCPUs and 1 GB ram.</p>
<h2 id="heading-requirements">Requirements</h2>
<ul>
<li>ARM-based instance running Canonical Ubuntu, preferably version 18 LTS or 20 LTS</li>
<li>Root access to the virtual machine through SSH</li>
</ul>
<h2 id="heading-install-docker-and-docker-compose">Install Docker and Docker-Compose</h2>
<h3 id="heading-update-and-upgrade">Update and Upgrade</h3>
<p>Make sure that you’re running the latest version of Ubuntu.</p>
<pre><code>sudo apt<span class="hljs-operator">-</span>get update <span class="hljs-operator">&amp;</span><span class="hljs-operator">&amp;</span> sudo apt<span class="hljs-operator">-</span>get upgrade
</code></pre><h3 id="heading-install-docker">Install Docker</h3>
<p>Now we’ll get onto the installation script, it’ll install Docker on your machine.</p>
<pre><code><span class="hljs-attribute">curl</span> -sSL https://get.docker.com | sh
</code></pre><h3 id="heading-install-docker-compose">Install Docker-Compose</h3>
<pre><code>sudo apt<span class="hljs-operator">-</span>get install libffi<span class="hljs-operator">-</span>dev libssl<span class="hljs-operator">-</span>dev
sudo apt install python3<span class="hljs-operator">-</span>dev
sudo apt<span class="hljs-operator">-</span>get install <span class="hljs-operator">-</span>y python3 python3<span class="hljs-operator">-</span>pip
</code></pre><blockquote>
<p>Sometimes you’ll get an error message <strong><em>“Package  has no installation candidate”</em></strong>, and an easy way to fix this is to reset your repository: (this will first make a backup of your old repository file then recreate a default version of it)</p>
</blockquote>
<pre><code>sudo mv <span class="hljs-operator">/</span>etc<span class="hljs-operator">/</span>apt<span class="hljs-operator">/</span>sources.list <span class="hljs-operator">~</span><span class="hljs-operator">/</span>
sudo touch <span class="hljs-operator">/</span>etc<span class="hljs-operator">/</span>apt<span class="hljs-operator">/</span>sources.list
</code></pre><p>Once python and python-pip has been installed, you can go ahead and install docker-compose.</p>
<pre><code><span class="hljs-attribute">sudo</span> pip<span class="hljs-number">3</span> install docker-compose
</code></pre><h3 id="heading-optional-add-docker-system-service-to-start-containers-at-boot">(Optional) Add Docker System Service to Start Containers at Boot</h3>
<p>This is a good addition, you can run the script below to enable start-up for Docker containers during system boot – this can prevent lots of downtime as the WordPress container will simply start up again in the event of a forced reboot.</p>
<pre><code>sudo systemctl <span class="hljs-keyword">enable</span> docker
</code></pre><h3 id="heading-test-that-docker-is-installed">Test that Docker is Installed</h3>
<p>First, run the following script to test that your Docker installation was successful.</p>
<pre><code><span class="hljs-attribute">docker</span> run hello-world
</code></pre><p>If it worked, it’ll display the following output:</p>
<pre><code>Hello <span class="hljs-keyword">from</span> Docker<span class="hljs-operator">!</span>
This message shows that your installation appears to be working correctly.

To generate <span class="hljs-built_in">this</span> message, Docker took the following steps:
 <span class="hljs-number">1.</span> The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the <span class="hljs-string">"hello-world"</span> image <span class="hljs-keyword">from</span> the Docker Hub.
    (arm64v8)
 <span class="hljs-number">3.</span> The Docker daemon created a <span class="hljs-keyword">new</span> container <span class="hljs-keyword">from</span> that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To <span class="hljs-keyword">try</span> something more ambitious, you can run an Ubuntu container with:
 $ docker run <span class="hljs-operator">-</span>it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https:<span class="hljs-comment">//hub.docker.com/</span>

For more examples and ideas, visit:
 https:<span class="hljs-comment">//docs.docker.com/get-started/</span>
</code></pre><h2 id="heading-using-docker-compose-to-install-wordpress">Using Docker-Compose to Install WordPress</h2>
<p>Use the code below to download the WordPress docker-compose and Dockerfile files, with the appropriate structure.</p>
<pre><code>sudo git <span class="hljs-keyword">clone</span> https:<span class="hljs-comment">//github.com/Alujjdnd/DockerWordpress.git</span>
</code></pre><p>Now enter the newly downloaded folder</p>
<pre><code><span class="hljs-built_in">cd</span> DockerWordpress/
</code></pre><p>Now run docker-compose</p>
<pre><code>docker<span class="hljs-operator">-</span>compose up
</code></pre><h2 id="heading-exposing-ports">Exposing Ports</h2>
<p>To reach your WordPress install, you’ll need to expose your ports to the public web, on different hosting providers there are different ways to do this, I’ve attached a few links below.</p>
<p>You’ll need to open port <strong>80</strong> to the public, and <strong>443</strong> if you wish to use SSL (https://…)</p>
<h3 id="heading-for-aws-ec2">For AWS EC2</h3>
<p>Follow these steps to do this:</p>
<ul>
<li>Open “<strong>Network &amp; Security</strong>” — Security Group settings are on the left-hand navigation</li>
<li>Find the security group connected to your instance</li>
<li>Choose “<strong>inbound rules</strong>”</li>
<li>Type the port number (in your case 8787) in “port range” then click “Add Rule”</li>
<li>Use the drop-down and add HTTP (port 80)</li>
</ul>
<p>And it is done.</p>
<p><em>From https://intellipaat.com/community/3700/how-to-open-a-web-server-port-on-ec2-instance</em></p>
<h3 id="heading-for-microsoft-azure-vms">For Microsoft Azure VMs</h3>
<p><a target="_blank" href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal">https://docs.microsoft.com/en-us/azure/virtual-machines/windows/nsg-quickstart-portal</a></p>
<h3 id="heading-for-oracle-cloud-compute">For Oracle Cloud Compute</h3>
<p>See the guide below for opening ports on Oracle Cloud VMs</p>
<blockquote>
<p><a target="_blank" href="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/">How to Open Ports in Oracle Cloud</a></p>
</blockquote>
<iframe class="wp-embedded-content" sandbox="allow-scripts" src="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/embed/#?secret=dCy7whsMhM#?secret=BQyoAqQwHB" width="600" height="338"></iframe>

<h2 id="heading-final-setup">Final Setup</h2>
<p>Go to <strong>http://YOUR_SERVER_IP</strong> to set up WordPress, you shouldn’t be prompted to enter any database details, follow the installation wizard to set your WordPress site up!</p>
<p>Happy coding!</p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/how-to-install-a-wordpress-docker-container-on-arm/">How to Install a WordPress Docker Container on ARM</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item><item><title><![CDATA[How to Open Ports in Oracle Cloud]]></title><description><![CDATA[Opening a port will let users on the public web to access your server through this “gate” of sorts, learn how to open ports from the Oracle Cloud Dashboard.
Oracle cloud’s virtual network and systems can be a bit confusing at times, but follow this g...]]></description><link>https://blog.jiuyu.me/how-to-open-ports-in-oracle-cloud</link><guid isPermaLink="true">https://blog.jiuyu.me/how-to-open-ports-in-oracle-cloud</guid><category><![CDATA[WordPress]]></category><category><![CDATA[Cloud Computing]]></category><category><![CDATA[networking]]></category><category><![CDATA[ARM]]></category><category><![CDATA[uncategorized]]></category><dc:creator><![CDATA[Jiuyu Zhang]]></dc:creator><pubDate>Thu, 29 Jul 2021 03:55:08 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/yLDabpoCL3s/upload/v1647960107323/oO3PCLjHf.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Opening a port will let users on the public web to access your server through this “gate” of sorts, learn how to open ports from the Oracle Cloud Dashboard.</p>
<p>Oracle cloud’s virtual network and systems can be a bit confusing at times, but follow this guide, and it’ll all be explained.</p>
<blockquote>
<p><strong>If you are using Ubuntu, see the section “Troubleshooting” below!</strong></p>
</blockquote>
<h2 id="heading-using-the-oracle-cloud-dashboard">Using the Oracle Cloud Dashboard</h2>
<p>Firstly, head over to the <a target="_blank" href="https://cloud.oracle.com/">Oracle Cloud Dashboard</a></p>
<p>Click on the instance you would like to change:</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949727392/iV3cV5NV8.png" alt /></a></p>
<p>Instances Dashboard</p>
<p>Click on the text after “Subnet:”</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-1.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949729590/WMXrBhDtf.png" alt /></a></p>
<p>Instance Details Dashboard</p>
<p>Click on the security list</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-2.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949731093/Cf80r3MdI.png" alt /></a></p>
<p>Virtual Subnet Dashboard</p>
<p>Click on “Add Ingress Rules”:</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-3.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949732417/MrhO1WM3b.png" alt /></a></p>
<p>Ingress Rules for Security Lists – specific to each virtual subnet</p>
<p>Set up as below, and press “Add Ingress Rules”</p>
<ul>
<li>Source Type – <strong>CIDR</strong></li>
<li>Source CIDR – <strong>0.0.0.0/0</strong></li>
<li>IP Protocol – <strong>TCP</strong></li>
<li>Source Port Range – <strong>80,443</strong> (or any port based on your need)</li>
<li>Destination Port Range – <strong>80,443</strong> (or any port based on your need)</li>
<li>Description (Optional) – <em><strong>anything</strong></em></li>
</ul>
<p>These settings will open ports 80 and 443 (for HTTP and HTTPS traffic) from any source, as represented by the CIDR 0.0.0.0/0. This will be over the TCP protocol, and if you would like to use UDP select that in the “IP Protocol” dropdown. (the dropdown also contains many other common ports that you might want to open, so check that out as well!)</p>
<p><a target="_blank" href="https://devblog.jiuyu.me/wp-content/uploads/2021/07/image-4.png"><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1647949733997/GkONFgyGw.png" alt /></a></p>
<p>The main interface for opening ports</p>
<p>Congrats! Your ports are now open.</p>
<h2 id="heading-troubleshooting">Troubleshooting</h2>
<p><strong>On Ubuntu, I’ve noticed a strange problem, which can be fixed with the following code.</strong></p>
<p>Run the following code, replacing “PORT” with the port of your choosing</p>
<pre><code>sudo iptables <span class="hljs-operator">-</span>I INPUT <span class="hljs-number">6</span> <span class="hljs-operator">-</span>m state <span class="hljs-operator">-</span><span class="hljs-operator">-</span>state NEW <span class="hljs-operator">-</span>p tcp <span class="hljs-operator">-</span><span class="hljs-operator">-</span>dport PORT <span class="hljs-operator">-</span>j ACCEPT
sudo netfilter<span class="hljs-operator">-</span>persistent save
</code></pre><p>This will open the port and refresh the netfilter – so that the port is open (this is a strange problem that only seems to happen on Ubuntu Oracle VMs).</p>
<p>Happy coding!</p>
<p>The post <a target="_blank" href="https://devblog.jiuyu.me/how-to-open-ports-in-oracle-cloud/">How to Open Ports in Oracle Cloud</a> appeared first on <a target="_blank" href="https://devblog.jiuyu.me">Jiuyu's Guide</a>.</p>
]]></content:encoded></item></channel></rss>