<?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: Muneer Syed</title>
    <description>The latest articles on DEV Community by Muneer Syed (@muneer007).</description>
    <link>https://dev.to/muneer007</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%2F320501%2F5145f302-52a2-4f49-9c2b-918de8d8211d.jpg</url>
      <title>DEV Community: Muneer Syed</title>
      <link>https://dev.to/muneer007</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muneer007"/>
    <language>en</language>
    <item>
      <title>Deploy Ghost with MySQL DB replication using helm chart</title>
      <dc:creator>Muneer Syed</dc:creator>
      <pubDate>Thu, 18 Jan 2024 22:14:12 +0000</pubDate>
      <link>https://dev.to/muneer007/deploy-ghost-with-mysql-db-replication-using-helm-chart-2kel</link>
      <guid>https://dev.to/muneer007/deploy-ghost-with-mysql-db-replication-using-helm-chart-2kel</guid>
      <description>&lt;p&gt;&lt;a href="https://media.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%2Fpt1s954o7r44jtjds433.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fpt1s954o7r44jtjds433.jpeg" alt="ghost"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ghost.org" rel="noopener noreferrer"&gt;Ghost&lt;/a&gt; is used by creators to run their own website to publish private content&lt;/p&gt;

&lt;h2&gt;
  
  
  Flow Diagram
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fnvxkm4ljd4aqmpw5397a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnvxkm4ljd4aqmpw5397a.png" alt="design"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quickstart Install
&lt;/h2&gt;

&lt;p&gt;These instructions are for ghost installation on bare metal Kubernetes cluster using &lt;code&gt;helm&lt;/code&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run the update dependency command to create bitnami MySQL helm chart in the ghost helm charts directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Muneer94/ghost-deploy.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ghost-deploy
helm dependency update ./ghost &lt;span class="nt"&gt;--debug&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Deploy &lt;a href="https://github.com/rancher/local-path-provisioner" rel="noopener noreferrer"&gt;local-path-provisioner&lt;/a&gt; storage class but it does not support &lt;code&gt;readwritemany&lt;/code&gt; so for high availability of your Kubernetes cluster better to use &lt;code&gt;longhorn&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# mak sure following packages are installed in kubernetes nodes&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;nfs-common cifs-utils &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="c"&gt;# longhorn&lt;/span&gt;
helm repo add longhorn https://charts.longhorn.io
helm repo update
helm upgrade &lt;span class="nt"&gt;--install&lt;/span&gt; longhorn longhorn/longhorn &lt;span class="nt"&gt;--namespace&lt;/span&gt; longhorn-system &lt;span class="nt"&gt;--create-namespace&lt;/span&gt;
&lt;span class="c"&gt;# make longhorn storage class as false so that we won't have multiple storage classes as default&lt;/span&gt;
kubectl patch storageclass longhorn &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s1"&gt;'{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Deploy ghost
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm upgrade &lt;span class="nt"&gt;--install&lt;/span&gt; ghost ghost &lt;span class="nt"&gt;--namespace&lt;/span&gt; example &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; custom/ghost/example.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Deploy ingress nginx controller to access ghost publicly with custom values in &lt;code&gt;custom/ghost&lt;/code&gt; directory
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm upgrade &lt;span class="nt"&gt;--install&lt;/span&gt; ingress-nginx ingress-nginx/ingress-nginx &lt;span class="nt"&gt;--namespace&lt;/span&gt; ingress-nginx &lt;span class="nt"&gt;--create-namespace&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; custom/ghost/nginx.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create ingress rules for routing traffic to ghost pod
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; custom/ghost/ingress.yaml &lt;span class="nt"&gt;-n&lt;/span&gt; example
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Deploying self hosted ghost on kubernetes with multiple replicas is not supported yet, we will be deploying it with only 1 replica.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ghost</category>
      <category>helm</category>
      <category>blog</category>
      <category>mysql</category>
    </item>
    <item>
      <title>How to install latest yarn version</title>
      <dc:creator>Muneer Syed</dc:creator>
      <pubDate>Sun, 24 Dec 2023 16:47:19 +0000</pubDate>
      <link>https://dev.to/muneer007/how-to-install-latest-yarn-version-39ec</link>
      <guid>https://dev.to/muneer007/how-to-install-latest-yarn-version-39ec</guid>
      <description>&lt;p&gt;To install the latest version of yarn4.x we need nodejs to be installed first and yarn1.x version&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JFVTcZNU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1a62ldbfvgf7v5gilacj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JFVTcZNU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1a62ldbfvgf7v5gilacj.png" alt="yarn" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Nodejs Installation Instructions&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Ubuntu:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Import nodesource GPG key
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update  
sudo apt-get install -y ca-certificates curl gnupg  
sudo mkdir -p /etc/apt/keyrings  
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg - dearmor -o /etc/apt/keyrings/nodesource.gpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add nodejs deb URL to the sources list
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NODE_MAJOR=21  
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;NODE_MAJOR&lt;/code&gt; can be changed depending on the version you need.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NODE_MAJOR=16  
NODE_MAJOR=18  
NODE_MAJOR=20  
NODE_MAJOR=21
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now run apt-get update and install nodejs
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;h4&gt;
  
  
  Uninstall:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get purge nodejs  
rm -r /etc/apt/sources.list.d/nodesource.list  
rm -r /etc/apt/keyrings/nodesource.gpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mac:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Install:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Uninstall:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew uninstall node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Yarn1.x Installation Instructions&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Ubuntu:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Import yarn GPG key
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Add yarn deb URL to the sources list
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now run apt-get update and install yarn
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update  
sudo apt-get install --no-install-recommends yarn -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;We don’t want apt-get to install nodejs again as we already installed the latest version of nodejs from the above method, so we are specifying --no-install-recommends in apt-get to not install nodejs along with yarn.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Uninstall:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get purge yarn  
rm -r /etc/apt/sources.list.d/yarn.list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mac:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Install:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Uninstall:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew uninstall yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Yarn4.x Installation Instructions
&lt;/h2&gt;

&lt;p&gt;After following the above methods we assume that yarn1.x binary is added to your path, if not run the following command to add it to your path&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;If corepack is not installed already use npm to install it globally&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g corepack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have to create a project directory and switch to that directory&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir yarn-project  
cd yarn-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize the project to use the latest version of yarn&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn init -2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to update yarn to the latest version you need to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn set version stable  
yarn install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now yarn will be configured to use the most recent stable binary&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Yarn will periodically gather anonymous telemetry to disable it run&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn config set --home enableTelemetry 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>yarn</category>
      <category>node</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
