<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Azzeddine Faik on Medium]]></title>
        <description><![CDATA[Stories by Azzeddine Faik on Medium]]></description>
        <link>https://medium.com/@azzeddinefaik?source=rss-2eefd94cf7f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6wqGxmGND9QPSpTKcF09ZQ.jpeg</url>
            <title>Stories by Azzeddine Faik on Medium</title>
            <link>https://medium.com/@azzeddinefaik?source=rss-2eefd94cf7f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:51:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@azzeddinefaik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to clone all projects of a group at once in Gitlab]]></title>
            <link>https://medium.com/@azzeddinefaik/how-to-clone-all-projects-of-a-group-at-once-in-gitlab-175635247e25?source=rss-2eefd94cf7f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/175635247e25</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[gitlab]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[gitlab-ci]]></category>
            <category><![CDATA[clones]]></category>
            <dc:creator><![CDATA[Azzeddine Faik]]></dc:creator>
            <pubDate>Tue, 12 Jul 2022 07:58:11 GMT</pubDate>
            <atom:updated>2022-07-12T07:58:11.740Z</atom:updated>
            <content:encoded><![CDATA[<p>On Terminal run the following command:</p><blockquote><em>➜ for repo in $(curl -s — header “PRIVATE-TOKEN: &lt;PRIVATE-TOKEN&gt;” </em><a href="https://gitlab.ea.com/api/v4/groups/5544"><em>https://gitlab.com/api/v4/groups/&lt;</em></a><em>GROUP-ID&gt; | jq -r “.projects[].ssh_url_to_repo”); do git clone $repo; done;</em></blockquote><p>E.g:</p><blockquote><em>for repo in $(curl -s — header “PRIVATE-TOKEN: </em>glpot-ZAEWDW_kolPfwE6sY<em>” </em><a href="https://gitlab.ea.com/api/v4/groups/5544"><em>https://gitlab.com/api/v4/groups/</em></a><em>9087 | jq -r “.projects[].ssh_url_to_repo”); do git clone $repo; done</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=175635247e25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Better Cost Control in Kubernetes]]></title>
            <link>https://faun.pub/better-cost-control-in-kubernetes-ffe72eb3744a?source=rss-2eefd94cf7f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffe72eb3744a</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[saving]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Azzeddine Faik]]></dc:creator>
            <pubDate>Fri, 01 Feb 2019 17:28:07 GMT</pubDate>
            <atom:updated>2019-07-18T19:02:19.504Z</atom:updated>
            <content:encoded><![CDATA[<p>Although they have the pricing models are easier to work, Google Cloud (probably all cloud provider ) have a lot of hidden costs. We need to put a lot efforts on optimisation of our deployments, and reviewing our costs to ensure that we have well optimised usage of resources</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hXxkGhmrEogG7PB2a18tiQ.png" /></figure><h3>prediction of costs:</h3><p>With you <strong>pay as you</strong> <strong>go</strong>, you will be billed only when you consumed a service but it necessarily leaves you open to unexpected cost spikes if something unexpected happens. from where it is really important to monitore your <strong>daily spend with reports, </strong>google cloud offer detailed billing analysis and you can export your billing data into BigQuery and have <a href="https://medium.com/google-cloud/analyze-your-google-cloud-platform-bills-w-bigquery-data-studio-7c9ebeb31b56"><strong>visualizations</strong></a><strong>.</strong></p><h3>Deployment of Hundred Services:</h3><p>when using Kubernetes with Microservices Architecture, where each services has a multiples type of deployments, statefulsets, load balancers, … it is really tricky to estimate the cost of our eco-system compared on monolith system where you can roughly estimate based on number of components you have in your system.</p><p><strong>Building and Owning a service</strong> is not a <strong>bunch of line of code</strong> you deploy inside docker containers and ship it to cloud! The ownership of a service on Microservices architecture means you will be on top on of your service in all aspects ; design , code, resources management, motoring metrics, costs.</p><ul><li><strong>Service Essentials : </strong>you’ll be running many services. <em>many</em> can mean tens, hundreds or even thousands. Each service encapsulates a piece of business capability into an independent package. they should be focused on a single purpose and big enough to minimize interactions</li><li><strong>Configuration Management:</strong></li></ul><p><strong>Does each service needs it’s own data server ?</strong></p><p>Not necessarily. possibly colocated within a shared <em>data server</em>. The key point it that the services should have no knowledge of each other’s underlying database. This way, you can start out with a shared data server and separate things out in the future with just a config change.</p><p><strong>Resources need to use : Requests and Limits</strong> ?</p><p>K8S has possibility to decide on resources need for your containers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*4zJuDnzohvYDzb4zbPl7jQ.png" /></figure><p>For each resource, containers can specify a resource request and limit, 0 &lt;= request &lt;=Node Allocatable &amp; request &lt;= limit &lt;= Infinity. If a pod is successfully scheduled, the container is guaranteed the amount of resources requested. Scheduling is based on requests and not limits. The pods and its containers will not be allowed to exceed the specified limit</p><blockquote>— Start Small —</blockquote><p>Make sure you <strong>request the minimum resources (requested resources will be allocated to your deployment even if it is not used and you will billed for it)</strong> needed to start you service in lowest load! and Use HPA or VPA to scale up and down when it is needed.</p><p><strong>HPA:</strong></p><p>The Horizontal Pod Autoscaler automatically scales the number of pods based on CPU or costumed metrics based on business values of your services (number of requests, lag of consumer in message handlers, …..). it is really important to have autoscaler, so you will not request the maximum resources forever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*avLXVutHihdMqE0EqISceA.png" /></figure><p><strong>VPA:</strong></p><p>Vertical Pod Autoscaler (VPA) frees the users from necessity of setting up-to-date resource requests for the containers in their pods. When configured.<strong>The inconvenient of VPA</strong> Whenever <strong>VPA updates the pod resources</strong> the pod is recreated, which <strong>causes all running containers to be restarted. </strong>Also it should <strong>not be used with HPA</strong> <strong>on CPU or Memory at the same time</strong>.</p><blockquote>‘I would prefer to do VPS manually, always monitor usage of resources on your monitoring tool then just update requests and limit of resources by yourself!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RjwAiBRLPyEhbcPF_hccVw.png" /></figure><h3>Volumes:</h3><p><strong>Storage Type</strong> : When using volumes, it is really important to understand <strong>disk utilisation (IO) </strong>in your Statefulset! Not all your Statefulsets need an <strong>SSD !</strong></p><p>K8S make it easy for you to create your <strong>PVC</strong> ( <strong>PersistentVolumeClaim</strong> ). In additional of decision of your <strong>storage type have a big </strong>impact on your<strong> cloud bill.</strong></p><p><strong>Size: </strong>Also<strong> </strong>of your volume can be another factor which can inflate your bill as well. e.g: size of <strong>redis cache</strong> should not be more then <strong>2 GB. </strong>But for your <strong>main database</strong> you will need to do a <strong>good projections</strong>!</p><p><strong>Expanding Persistent Volumes: </strong>expanding PersistentVolumeClaims (PVCs) is now enabled by default from <strong>Kubernetes 1.11</strong>. So when you request <strong>size</strong> request the minimum possible, as you will be always able to extend it <strong>without down time </strong>and<strong> with no need of data migration.</strong></p><p><strong>Reclaim policy </strong>in K8S tells the cluster what to do with the volume after it has been released of its claim. Currently, volumes can either be<strong> Retained, Deleted.</strong></p><ul><li><strong>Retained : </strong>means<strong> </strong>even if you delete your pvc, the disk still available on your cloud. So you will need to clean it else you <strong>will be paying for it.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*1-I8LLhpW82Wb-PRgmeoUw.jpeg" /></figure><ul><li><strong>Deleted: </strong>deletion removes both the <strong>PersistentVolume</strong> object from Kubernetes, as well as the associated storage asset. This not recommended in your productions.</li></ul><h3>Service Scheduler :</h3><ul><li><strong>Node Selection:</strong></li></ul><p>Choosing the right node while scheduling your pods is really an important factor on good optimisation of resource allocation! Google Cloud provide multiple type of machine : n1-standard-1 , n1-highmem-2 , n1-highcpu-2 ,...</p><p>So <strong>better distribution of pods inside our nodes</strong>, increase the <strong>efficiency of resource allocation </strong>on<strong> </strong>our cloud.</p><p>e.g : Mongodb is using memory more then cpu, so using n1-highmem-2 could be a good fit for Mongodb statefulset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*cwhaSX8lwgU50DBiyC8Izg.png" /></figure><p>Always, monitor your node resources utilisation using some monitoring tools :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PlBTYATgyF-DzFwzseOuvQ.png" /></figure><h3>Inter-zone networking :</h3><p>We use multiple zones to ensure redundancy and reliability, networking can introduce surprisingly high costs, particularly for noisy components like Apache Kafka/Storm/… To avoid that you will need to review your fetch and pull strategy! Also review networking utilisation over time in your system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8n8oA6PFs-rkvEQpPC1EPw.png" /></figure><p>Better <strong>Scheduling pods</strong> might help as well to reduce <strong>Inter-zone traffics</strong>: <strong>Group pods that have high interactions in same zone</strong></p><h3>Search for the discounts:</h3><p>Google offers discounts which are automatic discounts and other need committed contract:</p><ul><li>Sustained use discounts : <a href="https://cloud.google.com/compute/docs/sustained-use-discounts">https://cloud.google.com/compute/docs/sustained-use-discounts</a></li><li>Committed Use Discounts : <a href="https://cloud.google.com/compute/docs/instances/signing-up-committed-use-discounts">https://cloud.google.com/compute/docs/instances/signing-up-committed-use-discounts</a></li></ul><p><strong>Price Calculator</strong> : <a href="https://cloud.google.com/products/calculator/">https://cloud.google.com/products/calculator/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Join our community Slack and read our weekly Faun topics ⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffe72eb3744a" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/better-cost-control-in-kubernetes-ffe72eb3744a">Better Cost Control in Kubernetes</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CIrcleCI and GKE Kubernetes Easy steps]]></title>
            <link>https://faun.pub/circleci-and-gke-kubernetes-easy-steps-de59c8f3baeb?source=rss-2eefd94cf7f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/de59c8f3baeb</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[circleci]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Azzeddine Faik]]></dc:creator>
            <pubDate>Wed, 30 Jan 2019 16:14:46 GMT</pubDate>
            <atom:updated>2019-07-18T18:57:02.880Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>CIrcleCI and GKE Kubernetes Easy steps</strong></p><p>In the current guide I am going to document how to build a complete CI/CD pipeline from scratch, using kubernetes and Circleci.</p><p>We mainly will build workflows, so code can be deployed across the different environments:</p><ul><li>Get our code into a container?</li><li>Automate our build and test execution (CI)?</li><li>Publish our docker images to gcloud registry ?</li><li>Setup Kubernetes Cluster?</li><li>Automate deployment to Kubernetes?</li><li>Make our apps publicly accessible?</li></ul><p>In beginning let’s have a look at tools we will use:</p><p><a href="https://circleci.com/"><strong><em>CircleCI</em></strong></a><em> is a CI/CD platform that integrates easily with GitHub and has scaled nicely to our build/test/deployment needs. It also has intelligence to analyze the code base and run unit tests automatically.</em></p><p><em>So what’s </em><strong><em>Kubernetes</em></strong><em>?</em></p><p>You can think of Kubernetes as a scheduler. Kubernetes inspects your infrastructure, When you request to deploy a container, Kubernetes identifies the memory requirements for your container and finds the best server that satisfies your request.</p><blockquote>In other words, Kubernetes will play Tetris with your infrastructure.</blockquote><blockquote>Docker containers are the blocks; servers are the boards, and Kubernetes is the player.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sD7gXzEomI0Py1OzUsN8TQ.png" /><figcaption>K8S Cluster</figcaption></figure><p>A typical CI/CD pipeline is linear and one-directional. It is composed of a few stages, or phases. The first phase takes a commit from the mainline and runs a few steps to verify that commit. checkout, compilation and running unit tests, code analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*E8eJAWYMOh7gmw8dEmRj4g.png" /><figcaption>CI Steps</figcaption></figure><p><strong>Setup Kubernetes Cluster :</strong></p><p>Using GCP Console : <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster">https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster</a></p><p>Using Terraform : <a href="https://github.com/azzeddinefaik/k8s-landscape/blob/master/demos/terraform/">https://github.com/azzeddinefaik/k8s-landscape/blob/master/demos/terraform/</a></p><p><strong>Setup Circle CI WorkFlows :</strong></p><p>workflows is set of multiple job, which have similar steps and syntax, on exemple will have mainly 2 main jobs : Build and deploy; they are similar , and have some similar steps. Those steps consist of :</p><ul><li><strong>Spin up Environment : </strong>An “executor” is roughly “a place where steps occur”.</li></ul><p>‘* . <strong>docker</strong>: for <a href="https://circleci.com/docs/2.0/configuration-reference/#docker">docker executor</a></p><p>‘* . <strong>machine</strong>: for <a href="https://circleci.com/docs/2.0/configuration-reference/#machine">machine executor</a></p><p>‘* . <strong>macos</strong>: for <a href="https://circleci.com/docs/2.0/configuration-reference/#macos">macOS executor</a></p><ul><li><strong>Checkout code</strong></li></ul><p>Used to clone your code into project folder.</p><ul><li><strong>Checkout submodules</strong></li></ul><p>If needed to update and checkout submodules ( Mainly used to check out CI scripts)</p><ul><li><strong>Setup settings and environment variables</strong></li></ul><p>Install needed tools, and also to setup environment variables (dev, integrations, pre-prod, prod). and authenticate to systems (setup gcloud auth …)</p><ul><li><strong>Build docker images</strong></li></ul><p>Build/update images used on your k8s deployment.</p><ul><li><strong>Run Lint &amp; Code analysis</strong></li></ul><p>Run Linting and code anlysis</p><ul><li><strong>Run Tests and Code Coverage</strong></li></ul><p>Run Tests and coverage and report result to Github</p><ul><li><strong>Publish Docker Images</strong></li></ul><p>Publish images to Registry if deploy stage.</p><ul><li><strong>Deploy Containers</strong></li></ul><p>Deploy your code to k8s clusters.</p><p><strong>Demos and easy steps :</strong></p><p>Lets assume we have created a k8s cluster on Google Cloud. To trigger your build on circleci, CircleCI expects a config.yml to exist in /.circleci/config.yml ! check the exemple bellow:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fc1f6b9ccc8abb4556dadb3cc51a0038/href">https://medium.com/media/fc1f6b9ccc8abb4556dadb3cc51a0038/href</a></iframe><p>Then let deploy wordpress deployment k8s setup Check files:</p><ul><li><a href="https://github.com/azzeddinefaik/k8s-landscape/tree/master/demos/wordpress/k8s">https://github.com/azzeddinefaik/k8s-landscape/tree/master/demos/wordpress/k8s</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Join our community Slack and read our weekly Faun topics ⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de59c8f3baeb" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/circleci-and-gke-kubernetes-easy-steps-de59c8f3baeb">CIrcleCI and GKE Kubernetes Easy steps</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>