<?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 Abdul Hakim on Medium]]></title>
        <description><![CDATA[Stories by Abdul Hakim on Medium]]></description>
        <link>https://medium.com/@ahakimx?source=rss-684547fb6a2f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FIr398uzpRrMwcOsP3UkSQ.jpeg</url>
            <title>Stories by Abdul Hakim on Medium</title>
            <link>https://medium.com/@ahakimx?source=rss-684547fb6a2f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:15:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahakimx/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[Deploy Openstack All-in-one with Kolla-ansible]]></title>
            <link>https://medium.com/@ahakimx/deploy-openstack-all-in-one-with-kolla-ansible-f4bcfeb6ac57?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4bcfeb6ac57</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[openstack]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Fri, 12 Feb 2021 08:59:33 GMT</pubDate>
            <atom:updated>2022-11-14T10:56:43.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*WT6ROatUI2X00gfn" /></figure><h4>What is openstack ?</h4><blockquote>“OpenStack is an open source cloud computing infrastructure software project and is one of the three most active open source projects in the world”.</blockquote><p>More details about openstack click <a href="http://openstack.org/">here</a></p><h4>Requirements for this tutorial:</h4><ul><li>Ubuntu 18.04 CPU 8 core,</li><li>8 GB RAM</li><li>storage vda 50 GB, vdb 50G</li><li>2 network interfaces ens3 &gt; 10.20.20.10. ens9 &gt; 10.30.30.10</li><li>Kolla ansible, <a href="https://docs.openstack.org/kolla-ansible/latest/">here</a></li></ul><p>Lets build, setup on vm ubuntu</p><h4>1. Update, upgrade server and install dependency</h4><pre>$ sudo apt-get update; sudo apt-get upgrade<br>$ sudo apt-get install python3-dev libffi-dev gcc libssl-dev<br>$ sudo apt-get install python3-pip</pre><h4>2. create a new user</h4><p>This case user named kolla, then set kolla user as sudoer without password.</p><pre>$ sudo useradd kolla -m -s /bin/bash<br>$ sudo vim /etc/sudoers.d/kolla<br>...<br>kolla ALL=(ALL) NOPASSWD: ALL<br>...</pre><pre>$ su - kolla</pre><h4>3. Install kolla-ansible</h4><pre>$ sudo pip3 install -U pip<br>$ sudo pip3 install ansible<br>$ pip3 install kolla-ansible==10.0<br>$ sudo mkdir -p /etc/kolla<br>$ sudo chown $USER:$USER /etc/kolla<br>$ cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla<br>$ cp /usr/local/share/kolla-ansible/ansible/inventory/* .</pre><h4>4. create a partition for cinder volume</h4><p>for tutorial create partition lvm you can see <a href="https://www.techoism.com/create-new-partition-using-lvm-linux/">here</a>.</p><pre>$ sudo fdisk /dev/vdb</pre><pre>+--------+------+----------------+<br>| Device | Size |      Type      |<br>+--------+------+----------------+<br>| vdb1   | 100G | 8e (Linux LVM) |<br>+--------+------+----------------+</pre><h4>5. Create LVM disk for cinder service</h4><pre>sudo pvcreate -f /dev/vdb1<br>sudo pvs<br>sudo vgcreate -f cinder-volumes /dev/vdb1<br>sudo vgs</pre><h4>6. Edit ansible config</h4><pre>$ sudo vim /etc/ansible/ansible.cfg<br>...<br>[defaults]<br>host_key_checking=False<br>pipelining=True<br>forks=100<br>...</pre><h4>7. Generate kolla password</h4><pre>$ kolla-genpwd</pre><h4>8. Edit kolla configuration</h4><pre>$ vi /etc/kolla/globals.yml<br>...<br>kolla_base_distro: &quot;ubuntu&quot;<br>kolla_install_type: &quot;source&quot;<br>openstack_release: &quot;ussuri&quot;<br>kolla_internal_vip_address: &quot;10.20.20.10&quot;<br>network_interface: &quot;ens3&quot;<br>neutron_external_interface: &quot;ens9&quot;<br>neutron_plugin_agent: &quot;openvswitch&quot;<br>enable_heat: &quot;yes&quot;<br>enable_neutron_provider_networks: &quot;yes&quot;<br>nova_compute_virt_type: &quot;kvm&quot;<br>enable_cinder: &quot;yes&quot;<br>enable_cinder_backend_lvm: &quot;yes&quot;<br>cinder_volume_group: &quot;cinder-volumes&quot;<br>enable_neutron_qos: &quot;yes&quot;<br>enable_openstack_core: &quot;yes&quot;<br>enable_haproxy: &quot;no&quot;<br>...</pre><h4>9. Deployment kolla</h4><pre>kolla-ansible -i all-in-one bootstrap-servers<br>kolla-ansible -i all-in-one prechecks<br>kolla-ansible -i all-in-one deploy<br>kolla-ansible -i all-in-one post-deploy<br>kolla-ansible -i all-in-one check</pre><h4>10. install openstack CLI client</h4><pre>pip install python3-openstackclient</pre><h4>11. Testing installation</h4><p>There is a script that will create example networks, images, and so on.</p><pre>$ cd /usr/local/share/kolla-ansible/<br>$ ./init-runonce</pre><h4>12. Check openstack services</h4><pre>$ source /etc/kolla/admin-openrc.sh</pre><pre>$ openstack service list<br>+----------------------------------+-------------+----------------+<br>| ID                               | Name        | Type           |<br>+----------------------------------+-------------+----------------+<br>| 211967ceae3b4cf1bc04ca1587c73073 | nova        | compute        |<br>| 4b0a44c2ae654e45a22ec6539d8c5634 | glance      | image          |<br>| 53b944270b7f489ea37f00027e5999a3 | neutron     | network        |<br>| 6dc350336f8c4a14831dda920545f64a | keystone    | identity       |<br>| 83bafae712084e76b09d6da590152bd0 | cinderv2    | volumev2       |<br>| 988dab40890d452a8f55eef7f85bfd46 | placement   | placement      |<br>| ab8d636872db481ea04b6c6075d63f8e | heat        | orchestration  |<br>| ae288e6298ea42af8cabb9d8865d0fac | cinderv3    | volumev3       |<br>| ba92ae6b96a04d2d9671a92802c90e61 | nova_legacy | compute_legacy |<br>| ea54bc5ca34846c894d12a054c1969a9 | heat-cfn    | cloudformation |<br>+----------------------------------+-------------+----------------+</pre><p>Openstack all-in-one has been installed on ubuntu 18.04.</p><p>Reference:</p><p><a href="https://docs.openstack.org/kolla-ansible/latest/">https://docs.openstack.org/kolla-ansible/latest/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4bcfeb6ac57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS — Launch an Instance]]></title>
            <link>https://medium.com/@ahakimx/aws-launch-an-instance-f5db5f60a7fc?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5db5f60a7fc</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Fri, 01 Jan 2021 21:38:20 GMT</pubDate>
            <atom:updated>2021-01-01T21:38:20.373Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS — Launch an Instance</h3><p>This is a tutorial step by step to launch an instance in AWS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*g98Ebdxrfypi_4uZNTALkQ.png" /><figcaption>aws EC2</figcaption></figure><blockquote>Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2’s simple web service interface allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. <a href="https://aws.amazon.com/ec2/?ec2-whats-new.sort-by=item.additionalFields.postDateTime&amp;ec2-whats-new.sort-order=desc">docs</a></blockquote><h4>1. Login in AWS account and go to the AWS Management Console &gt; select the EC2 service.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vQ5JA5hyLABea7KY" /></figure><h4>2. Launch a instance, click on button Launch instance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p6nrS_PkJ1qzcLHS" /></figure><h4>3. Choose an Amazon Machine Image (AMI)</h4><p>In this case i’ am choose the one available under the free-tier option. Amazon Linux 2 AMI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rAedX63pBiXnL_-y" /></figure><h4>4. Choose an instance type</h4><p>In this case iam choose instance type is t2.micro and then click Next: Configure Instance Detail</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WyY9KXHJO8gpuA1z" /></figure><h4>5. Configure Instance Detail</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OiZoT_HOgkgDJh-M" /></figure><h4>6. Add Storage</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UAGM9sgoFyIispdu" /></figure><h4>7. Add Tags</h4><p>Tags can as a label, tagging helps in easy search and grouping resources for various purposes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-Ncs-95sMjP0GROK" /></figure><h4>8. Configure Security Group</h4><p>Attach a set of firewall rules to your instance, then click Review and Launch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E-fHwZvBCGKLWl-u" /></figure><h4>9. Review Instance</h4><p>Review the instance and if ok, Launch the instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*F-Rag_3lJWulKudy" /></figure><h4>10. Download Key Pair</h4><p>Download a key pair to connect your instance, choose create a new key pair, put key pair name then click Download Key Pair button &gt; Launch Instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A5t8Gnsj9AULHRxh" /></figure><h4>11. Launch Status</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3gS4oGNdKTmPdFCw" /></figure><h4>12. View Instance</h4><p>View instance detail such public IPv4 address, Public IPv4 DNS, security, networking and etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*S0bex1s9ayNn3iQY" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5db5f60a7fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Kafka Cluster and Zookeeper with High Availability]]></title>
            <link>https://medium.com/@ahakimx/install-kafka-cluster-and-zookeeper-with-high-availability-315fa478b0c1?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/315fa478b0c1</guid>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[zookeeper]]></category>
            <category><![CDATA[kafka]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sun, 22 Nov 2020 15:38:24 GMT</pubDate>
            <atom:updated>2020-11-22T15:38:24.979Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*_QgMuJgHTnKa1i5ZMTRsYQ.png" /><figcaption>kafka multi broker</figcaption></figure><h4>What is apache kafka ?</h4><blockquote>Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications. <a href="https://kafka.apache.org/">https://kafka.apache.org/</a></blockquote><h4>What is apache zookeeper?</h4><blockquote>ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. <a href="https://zookeeper.apache.org/">https://zookeeper.apache.org/</a></blockquote><h4>Setup Zookeeper Cluster with High Availability</h4><ul><li>Install java on all node ha-zoo*</li></ul><pre>sudo apt update<br>apt install -y openjdk-11-jdk</pre><ul><li>setup dns local on all node ha-zoo*</li></ul><pre>vi /etc/hosts<br>10.20.20.51 ha-zoo1<br>10.20.20.52 ha-zoo2<br>10.20.20.53 ha-zoo3</pre><ul><li>download zookeeper on all node ha-zoo*</li></ul><pre>cd /opt<br>sudo wget <a href="https://downloads.apache.org/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz">https://downloads.apache.org/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz</a></pre><ul><li>ekstract zookeeper package on all node ha-zoo*</li></ul><pre>sudo tar -xvf apache-zookeeper-3.6.2-bin.tar.gz<br>sudo mv apache-zookeeper-3.6.2 zookeeper<br>cd zookeeper</pre><ul><li>config multiple zookeeper on all node ha-zoo*</li></ul><pre>sudo vi conf/zoo.cfg<br>tickTime=2000<br>dataDir=/data/zookeeper<br>clientPort=2181<br>initLimit=10<br>syncLimit=5<br>server.1=ha-zoo1:2888:3888<br>server.2=ha-zoo2:2888:3888<br>server.3=ha-zoo3:2888:3888</pre><h4>set multiple zookeeper, setup each node</h4><ul><li>on node ha-zoo1, add the file</li></ul><pre>vi /data/zookeeper/myid<br>1</pre><ul><li>on node ha-zoo2, add the file and save</li></ul><pre>vi /data/zookeeper/myid<br>2</pre><ul><li>on node ha-zoo3 add the file and save</li></ul><pre>vi /data/zookeeper/myid<br>3</pre><ul><li>running zookeeper on all node ha-zoo*</li></ul><pre>java -cp lib/zookeeper-3.6.2.jar:lib/*:conf org.apache.zookeeper.server.quorum.QuorumPeerMain conf/zoo.cfg</pre><ul><li>testing on node ha-zoo3</li></ul><pre>cd /opt/zookeeper<br>bin/zkCli.sh -server ha-zoo1:2181<br>[zk: ha-zoo3:2181(CONNECTED) 0] ls /<br>[zookeeper]<br>[zk: ha-zoo3:2181(CLOSED) 3] quit</pre><p>well done, zookeeper cluster running well. And then we will setup kafka cluster.</p><h3>Setup Kafka Cluster Multi Broker with High Availability</h3><ul><li>Install java on all node ha-kafka*</li></ul><pre>apt update<br>apt install -y openjdk-11-jdk</pre><ul><li>setup dns local on all node ha-kafka*</li></ul><pre>vi /etc/hosts<br>10.20.20.41 ha-kafka1<br>10.20.20.42 ha-kafka2<br>10.20.20.43 ha-kafka3<br>10.20.20.51 ha-zoo1<br>10.20.20.52 ha-zoo2<br>10.20.20.53 ha-zoo3</pre><ul><li>Create folder inside /opt and download kafka</li></ul><pre>mkdir /opt/kafka<br>curl <a href="https://downloads.apache.org/kafka/2.6.0/kafka_2.13-2.6.0.tgz">https://downloads.apache.org/kafka/2.6.0/kafka_2.13-2.6.0.tgz</a> -o /opt/kafka/kafka.tgz</pre><ul><li>extract kafka</li></ul><pre>cd /opt/kafka<br>tar xvfz kafka.tgz --strip 1</pre><ul><li>create directory for kafka data on all node</li></ul><pre>sudo mkdir -p /data/kafka/log<br>chown -R ubuntu:ubuntu /data/kafka/</pre><ul><li>setup zookeeper connect on server configuration, exec on all node kafka cluster, edit this file</li></ul><pre>vi bin/config/server.properties</pre><pre>log.dirs=/data/kafka/log<br>num.partitions=3<br>zookeeper.connect=ha-zoo1:2181,ha-zoo2:2181,ha-zoo3:2181</pre><ul><li>set unique broker id each node kafka cluster, exec on ha-kafka1</li></ul><pre>vi bin/config/server.properties<br>broker.id=0</pre><ul><li>exec on ha-kafka2</li></ul><pre>vi bin/config/server.properties<br>broker.id=1</pre><ul><li>exec on ha-kafka3</li></ul><pre>vi bin/config/server.properties<br>broker.id=2</pre><ul><li>create kafka as a service</li></ul><pre>vi /etc/systemd/system/kafka.service<br>[Unit]<br>Description=Kafka<br>Before=<br>After=network.target</pre><pre>[Service]<br>User=ubuntu<br>CHDIR= {{ data_dir }}<br>ExecStart=/opt/kafka/bin/kafka-server-start.sh /opt/kafka/config/server.properties<br>Restart=on-abort</pre><pre>[Install]<br>WantedBy=multi-user.target</pre><ul><li>reload daemon</li></ul><pre>sudo systemctl daemon-reload</pre><ul><li>start and enable kafka service</li></ul><pre>sudo systemctl start kafka.service<br>sudo systemctl enable kafka.service<br>sudo systemctl status kafka.service</pre><p>if no problem, continue to create a topic</p><ul><li>test create topic</li></ul><pre>root@ha-kafka1:/opt/kafka# bin/kafka-topics.sh --create --bootstrap-server ha-kafka1:9092 ha-kafka2:9092 ha-kafka3:9092 --topic test-multibroker<br>Created topic test-multibroker.</pre><ul><li>See list the topic</li></ul><pre>root@ha-kafka1:/opt/kafka# bin/kafka-topics.sh --list --bootstrap-server ha-kafka1:9092 ha-kafka2:9092 ha-kafka3:9092 <br>test-multibroker</pre><pre>root@ha-kafka1:/opt/kafka# ls /data/kafka/log/<br>cleaner-offset-checkpoint log-start-offset-checkpoint meta.properties recovery-point-offset-checkpoint replication-offset-checkpoint test-multibroker-0 test-multibroker-2</pre><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=315fa478b0c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Kubernetes High Availabilty with Multi Master]]></title>
            <link>https://medium.com/@ahakimx/install-kubernetes-high-availabilty-with-multi-master-54bf6a3e98dc?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/54bf6a3e98dc</guid>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sun, 04 Oct 2020 11:46:43 GMT</pubDate>
            <atom:updated>2022-11-10T14:17:17.125Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setup Multi Master Kubernetes Cluster with Kubeadm</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*pRVQS3EvhoQE3fyqRXlL3A.png" /><figcaption>kubernetes high availability</figcaption></figure><h3>Requirements:</h3><ul><li>kubernetes version 1.15.11</li><li>haproxy</li><li>docker</li></ul><p>Node list:</p><ul><li>ha-balancer 10.10.10.100</li><li>ha-master1 10.10.10.10</li><li>ha-master2 10.10.10.11</li><li>ha-master3 10.10.10.12</li><li>ha-worker1 10.10.10.20</li><li>ha-worker2 10.10.10.21</li></ul><h3>On all node execute this command</h3><pre>sudo apt update; sudo apt autoremove -y</pre><h3>Install docker package on ha-master1, ha-master2, ha-master3, ha-node1, ha-node2</h3><pre>sudo apt install -y docker.io=18.09.7-0ubuntu1~18.04.4</pre><pre>cat &gt; /etc/docker/daemon.json &lt;&lt;EOF<br>{<br>  &quot;exec-opts&quot;: [&quot;native.cgroupdriver=systemd&quot;]<br>}<br>EOF</pre><pre>mkdir -p /etc/systemd/system/docker.service.d</pre><h3>Restart docker</h3><pre>systemctl daemon-reload<br>systemctl restart docker</pre><h3>Install kubectl, kubelet &amp; kubeadm on all node master, ha-master1, ha-master2, ha-master3</h3><pre>sudo apt install -y apt-transport-https; curl -s &lt;https://packages.cloud.google.com/apt/doc/apt-key.gpg&gt; | sudo apt-key add -</pre><pre>cat &lt;&lt;EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list<br>deb &lt;http://apt.kubernetes.io/&gt; kubernetes-xenial main<br>EOF</pre><pre>sudo apt update; sudo apt install -y kubelet=1.15.11-00 kubeadm=1.15.11-00 kubectl=1.15.11-00</pre><h3>hold kubelet, kubeadm and kubectl</h3><pre>sudo apt-mark hold kubelet kubeadm kubectl<br>sudo systemctl enable kubelet</pre><h3>disable swap on master node and worker node</h3><pre>sudo swapon -s<br>swappoff -a</pre><pre>cat &lt;&lt;EOF | sudo tee /etc/sysctl.d/k8s.conf<br>.bridge.bridge-nf-call-ip6tables = 1<br>.bridge.bridge-nf-call-iptables = 1<br>EOF</pre><pre>sudo sysctl --system<br>sudo modprobe br_netfilter</pre><p>Install and configure haproxy on node ha-balancer</p><pre>sudo apt update; sudo apt install haproxy -y</pre><pre>sudo vim /etc/haproxy/haproxy.cfg</pre><pre>...<br>frontend kubernetes<br>bind 10.10.10.100:6443<br>option tcplog<br>mode tcp<br>default_backend kubernetes-master-nodes</pre><pre>backend kubernetes-master-nodes<br>mode tcp<br>balance roundrobin<br>option tcp-check<br>server ha-master1 10.10.10.10:6443 check fall 3 rise 2<br>server ha-master2 10.10.10.11:6443 check fall 3 rise 2<br>server ha-master3 10.10.10.12:6443 check fall 3 rise 2</pre><pre>frontend api_server_kubernetes<br>bind 10.10.10.100:8080<br>option tcplog<br>mode tcp<br>default_backend kube_api_server_kubernetes</pre><pre>backend kube_api_server_kubernetes<br>mode tcp<br>balance roundrobin<br>option tcp-check<br>server ha-master1 10.10.10.10:8080 check fall 3 rise 2<br>server ha-master2 10.10.10.10:8080 check fall 3 rise 2<br>server ha-master3 10.10.10.10:8080 check fall 3 rise 2<br>...</pre><h3>verification haproxy configuration</h3><pre>haproxy -c -V -f /etc/haproxy/haproxy.cfg</pre><h3>restart haproxy service</h3><pre>sudo systemctl restart haproxy</pre><h3>Generate SSH Key on ha-master1 and then copy to other master node</h3><pre>sudo -i<br>ssh-keygen<br>cat /root/.ssh/id_rsa.pub</pre><h3>copy ssh key to other master</h3><pre>ssh-copy-id -i /root.ssh/id_rsa root@ha-master2<br>ssh-copy-id -i /root.ssh/id_rsa root@ha-master3</pre><h3>test ssh to ha-master2 and ha-master3</h3><pre>ssh 10.10.10.11<br>ssh 10.10.10.12</pre><h3>verification connection to ha-balancer</h3><pre>nc -v 10.10.10.100 6443<br>nc -v 10.10.10.100 8080</pre><h3>initialitation on ha-master1</h3><pre>vi config.yaml<br>...<br>apiVersion: kubeadm.k8s.io/v1beta2<br>kind: ClusterConfiguration<br>kubernetesVersion: v1.15.11<br>controlPlaneEndpoint: &quot;10.10.10.100:6443&quot;<br>...</pre><pre>kubeadm init --config=config.yaml --upload-certs</pre><h3>the results as below</h3><pre>You can now join any number of the control-plane node running the following command on each as root:</pre><pre>  kubeadm join 10.10.10.100:6443 --token 71qkw2.ardnuukvwlvhugbt \\<br>    --discovery-token-ca-cert-hash sha256:a8fad41061a6fb20207ebc3fabb5da65cf5dc397ef97c39ce6dc8f62863e5242 \\<br>    --control-plane --certificate-key 6cd223990b20aefad2c394f3217ef9cc10c8625d33f3a8b91bf7da8cad5db74a</pre><pre>Please note that the certificate-key gives access to cluster sensitive data, keep it secret!<br>As a safeguard, uploaded-certs will be deleted in two hours; If necessary, you can use<br>&quot;kubeadm init phase upload-certs --upload-certs&quot; to reload certs afterward.</pre><pre>Then you can join any number of worker nodes by running the following on each as root:</pre><pre>kubeadm join 10.10.10.100:6443 --token 71qkw2.ardnuukvwlvhugbt \\<br>    --discovery-token-ca-cert-hash sha256:a8fad41061a6fb20207ebc3fabb5da65cf5dc397ef97c39ce6dc8f62863e5242</pre><pre>mkdir -p $HOME/.kube<br>sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>sudo chown $(id -u):$(id -g) $HOME/.kube/config</pre><pre>mkdir -p $HOME/.kube<br>sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config<br>sudo chown $(id -u):$(id -g) $HOME/.kube/config</pre><h3>Deploy network CNI, this tutorial we willl use <a href="https://www.weave.works/docs/net/latest/kubernetes/kube-addon/">weave network</a></h3><pre>kubectl apply -f &quot;&lt;https://cloud.weave.works/k8s/net?k8s-version=$&gt;(kubectl version | base64 | tr -d &#39;\\n&#39;)&quot;</pre><h3>on ha-master2 and ha-master3 join cluster to ha-master1</h3><pre>kubeadm join 10.10.10.100:6443 --token 71qkw2.ardnuukvwlvhugbt \\<br>    --discovery-token-ca-cert-hash sha256:a8fad41061a6fb20207ebc3fabb5da65cf5dc397ef97c39ce6dc8f62863e5242 \\<br>    --control-plane --certificate-key 6cd223990b20aefad2c394f3217ef9cc10c8625d33f3a8b91bf7da8cad5db74a</pre><h3>on ha-worker1 and ha-worker2 join cluster as worker node</h3><pre>kubeadm join 10.10.10.100:6443 --token 71qkw2.ardnuukvwlvhugbt \\<br>    --discovery-token-ca-cert-hash sha256:a8fad41061a6fb20207ebc3fabb5da65cf5dc397ef97c39ce6dc8f62863e5242</pre><h3>verification nodes ready</h3><pre>kubectl get nodes<br>NAME         STATUS   ROLES    AGE    VERSION<br>ha-master1   Ready    master   5d3h   v1.15.11<br>ha-master2   Ready    master   5d3h   v1.15.11<br>ha-master3   Ready    master   5d3h   v1.15.11<br>ha-worker1   Ready    &lt;none&gt;   5d3h   v1.15.11<br>ha-worker2   Ready    &lt;none&gt;   5d3h   v1.15.11</pre><h3>verification all pods running</h3><pre>kubectl get pods -n kube-system<br>NAME                                 READY   STATUS    RESTARTS   AGE<br>coredns-66bff467f8-ffhz9             1/1     Running   0          5d3h<br>coredns-66bff467f8-w2lcw             1/1     Running   0          5d3h<br>etcd-ha-master1                      1/1     Running   0          5d3h<br>etcd-ha-master2                      1/1     Running   0          5d3h<br>etcd-ha-master3                      1/1     Running   0          5d3h<br>kube-apiserver-ha-master1            1/1     Running   0          5d3h<br>kube-apiserver-ha-master2            1/1     Running   0          5d3h<br>kube-apiserver-ha-master3            1/1     Running   0          5d3h<br>kube-controller-manager-ha-master1   1/1     Running   1          5d3h<br>kube-controller-manager-ha-master2   1/1     Running   0          5d3h<br>kube-controller-manager-ha-master3   1/1     Running   1          5d3h<br>kube-proxy-245hd                     1/1     Running   0          5d3h<br>kube-proxy-4ckq2                     1/1     Running   0          5d3h<br>kube-proxy-m62hj                     1/1     Running   0          5d3h<br>kube-proxy-rpl5t                     1/1     Running   0          5d3h<br>kube-scheduler-ha-master1            1/1     Running   2          5d3h<br>kube-scheduler-ha-master2            1/1     Running   0          5d3h<br>kube-scheduler-ha-master3            1/1     Running   0          5d3h<br>weave-net-4lkbs                      2/2     Running   2          5d3h<br>weave-net-526gt                      2/2     Running   2          5d3h<br>weave-net-bxvkk                      2/2     Running   0          5d3h<br>weave-net-ts2m2                      2/2     Running   0          5d3h<br>weave-net-bgsw4                      2/2     Running   0          5d3h</pre><h3>check cluster info</h3><pre># kubectl cluster-info<br>Kubernetes master is running at &lt;https://10.10.10.100:6443&gt;<br>KubeDNS is running at &lt;https://10.10.10.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy&gt;</pre><pre>root@ha-master1:~# kubectl get endpoints kube-scheduler -n kube-system -o yaml<br>apiVersion: v1<br>kind: Endpoints<br>metadata:<br>  annotations:<br>    control-plane.alpha.kubernetes.io/leader: &#39;{&quot;holderIdentity&quot;:&quot;ha-master2_327fadbe-ec94-43bb-8076-9a1aafa57cd3&quot;,&quot;leaseDurationSeconds&quot;:15,&quot;acquireTime&quot;:&quot;2020-10-04T06:25:34Z&quot;,&quot;renewTime&quot;:&quot;2020-10-04T11:06:30Z&quot;,&quot;leaderTransitions&quot;:2}&#39;<br>  creationTimestamp: &quot;2020-09-29T07:05:42Z&quot;<br>  managedFields:<br>  - apiVersion: v1<br>    fieldsType: FieldsV1<br>    fieldsV1:<br>      f:metadata:<br>        f:annotations:<br>          .: {}<br>          f:control-plane.alpha.kubernetes.io/leader: {}<br>    manager: kube-scheduler<br>    operation: Update<br>    time: &quot;2020-10-04T11:06:30Z&quot;<br>  name: kube-scheduler<br>  namespace: kube-system<br>  resourceVersion: &quot;1380211&quot;<br>  selfLink: /api/v1/namespaces/kube-system/endpoints/kube-scheduler<br>  uid: 5c15a8ad-a5fa-4d17-8416-0c97aff0cfe9</pre><h3>create example pod</h3><pre>root@ha-master1:~# kubectl run nginx --image=nginx<br>pod/nginx created</pre><pre>root@ha-master1:~# kubectl get pods<br>NAME    READY   STATUS    RESTARTS   AGE<br>nginx   1/1     Running   0          18s</pre><p>Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54bf6a3e98dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction ELK Stack — to Get Logs]]></title>
            <link>https://medium.com/@ahakimx/introduction-elk-stack-to-get-logs-69d66d13527c?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/69d66d13527c</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[centralized-logging]]></category>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[elk]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sun, 04 Oct 2020 04:57:22 GMT</pubDate>
            <atom:updated>2020-10-04T04:57:22.209Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction ELK Stack — to Get Logs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78E0opOxAwkVudHVGnb8QA.jpeg" /><figcaption>img source : <a href="https://unsplash.com/photos/2iP0J5fxy6A">https://unsplash.com/</a></figcaption></figure><p>Requirements for this tutorial:</p><ul><li>node3 -&gt; ubuntu 18.4 -&gt; server</li><li>node4 -&gt; ubuntu 18.04 -&gt; client</li><li>node5 -&gt; centos 7 -&gt; client</li></ul><p>Let’s Go:</p><p>Excecution on node3</p><ol><li>Update</li></ol><pre># apt -y update</pre><p>2. Install OpenJDK</p><pre># sudo apt -y install openjdk-8-jdk<br># java -version</pre><p>3. Install Elasticsearch</p><pre># wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -<br># apt -y install apt-transport-https<br># echo &quot;deb https://artifacts.elastic.co/packages/7.x/apt stable main&quot; | tee -a /etc/apt/sources.list.d/elastic-7.x.list<br># apt -y update &amp;&amp; apt -y install elasticsearch</pre><p>4. Configuration Elasticsearch</p><pre># cp /etc/elasticsearch/elasticsearch.yml /etc/elasticsearch/elasticsearch.yml.original<br># vi /etc/elasticsearch/elasticsearch.yml</pre><p>edit line 55 to uncomment</p><pre>network.host: localhost</pre><p>5. Activate elasticsearch service</p><pre>systemctl daemon-reload<br>systemctl enable elasticsearch<br>systemctl start elasticsearch<br>systemctl status elasticsearch</pre><p>6. Test Elasticsearch</p><pre>root@node3:~# netstat -tulpn                                                       <br>Active Internet connections (only servers)                                         <br>Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID<br>/Program name                                                                      <br>tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      206<br>58/nginx: master                                                                   <br>tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      843<br>3/systemd-resolv                                                                   <br>tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      202</pre><p>Curl elasticsearch</p><pre>root@node3:~# curl -XGET &#39;localhost:9200/?pretty&#39;<br>{<br>  &quot;name&quot; : &quot;node3&quot;,<br>  &quot;cluster_name&quot; : &quot;elasticsearch&quot;,<br>  &quot;cluster_uuid&quot; : &quot;PPNElJoQT7mo8LP9hOkdBA&quot;,<br>  &quot;version&quot; : {<br>    &quot;number&quot; : &quot;7.5.2&quot;,<br>    &quot;build_flavor&quot; : &quot;default&quot;,<br>    &quot;build_type&quot; : &quot;deb&quot;,<br>    &quot;build_hash&quot; : &quot;8bec50e1e0ad29dad5653712cf3bb580cd1afcdf&quot;,<br>    &quot;build_date&quot; : &quot;2020-01-15T12:11:52.313576Z&quot;,<br>    &quot;build_snapshot&quot; : false,<br>    &quot;lucene_version&quot; : &quot;8.3.0&quot;,<br>    &quot;minimum_wire_compatibility_version&quot; : &quot;6.8.0&quot;,<br>    &quot;minimum_index_compatibility_version&quot; : &quot;6.0.0-beta1&quot;<br>  },<br>  &quot;tagline&quot; : &quot;You Know, for Search&quot;<br>}</pre><h4>Kibana</h4><ol><li>Install Kibana</li></ol><pre>apt -y install kibana</pre><p>2. Configuratation &amp; integration kibana with elasticsearch</p><pre>cp /etc/kibana/kibana.yml /etc/kibana/kibana.yml.original<br>vi /etc/kibana/kibana.yml</pre><p>edit line 7 to uncomment</p><pre>server.host: &quot;localhost&quot;</pre><p>3. Activate kibana service</p><pre>systemctl enable kibana<br>systemctl start kibana<br>systemctl status kibana</pre><p>4. Install &amp; configuration nginx as a reverse proxy</p><ul><li>install nginx</li></ul><pre>apt -y install nginx apache2-utils</pre><ul><li>configuration nginx</li></ul><pre># cp /etc/nginx/sites-available/default /etc/nginx/sites-available/default.original<br># vi /etc/nginx/sites-available/default</pre><p>edit file /etc/nginx/sites-available/default, to be</p><pre>server {<br>    listen 80;<br><br>    server_name _;<br><br>    auth_basic &quot;Restricted Access&quot;;<br>    auth_basic_user_file /etc/nginx/htpasswd.kibana;<br><br>    location / {<br>        proxy_pass http://localhost:5601;<br>        proxy_http_version 1.1;<br>        proxy_set_header Upgrade $http_upgrade;<br>        proxy_set_header Connection &#39;upgrade&#39;;<br>        proxy_set_header Host $host;<br>        proxy_cache_bypass $http_upgrade;<br>    }<br>}</pre><ul><li>Create user &amp; password to login dashboard kibana</li></ul><pre># htpasswd -c /etc/nginx/htpasswd.kibana [username]</pre><ul><li>Activation nginx service</li></ul><pre>systemctl enable nginx<br>systemctl restart nginx<br>systemctl status nginx<br>netstat -tupln</pre><p>5. Access kibana dashboard</p><p><a href="http://ip_node3/">http://IP_node3</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDdGHeRk2KTzdHmFUtTFOw.png" /></figure><h4>LOGSTASH</h4><p>Excecution on node3</p><ol><li>Install Logstash</li></ol><pre>apt -y install logstash</pre><p>2. Configuration Logstash</p><pre>vi /etc/logstash/conf.d/input-filebeat.conf</pre><ul><li>Create input to elasticsearch</li></ul><pre>input {<br>  beats {<br>    port =&gt; 5044<br>  }<br>}</pre><ul><li>Create output to elasticsearch</li></ul><pre>vi /etc/logstash/conf.d/output-elasticsearch.conf</pre><pre>output {<br>  elasticsearch {<br>    hosts =&gt; [&quot;localhost:9200&quot;]<br>    manage_template =&gt; false<br>    index =&gt; &quot;%{[fields][log_name]}_%{[agent][hostname]}_%{+YYYY.MM}&quot;<br>  }<br>}</pre><p>3. Activate logstash service</p><pre>systemctl enable logstash<br>systemctl start logstash<br>systemctl status logstash<br>netstat -tupln</pre><h4>FILEBEAT</h4><p>Excecution on node4 &amp; node5</p><ol><li>Install Filebeat on node4</li></ol><pre># apt -y update<br><br># wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -<br># apt -y install apt-transport-https<br># echo &quot;deb https://artifacts.elastic.co/packages/7.x/apt stable main&quot; | tee -a /etc/apt/sources.list.d/elastic-7.x.list<br># apt -y update &amp;&amp; apt -y install filebeat<br><br># systemctl enable filebeat<br># systemctl status filebeat</pre><p>2. Install Filebeat on node5</p><pre># yum -y update<br># rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch<br># vi /etc/yum.repos.d/elastic.repo<br><br>...<br>[elastic-7.x]<br>name=Elastic repository for 7.x packages<br>baseurl=https://artifacts.elastic.co/packages/7.x/yum<br>gpgcheck=1<br>gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch<br>enabled=1<br>autorefresh=1<br>type=rpm-md<br>...<br><br># yum -y install filebeat<br><br># systemctl enable filebeat<br># systemctl start filebeat<br># systemctl status filebeat</pre><h4>Send log to logstash</h4><p>Excecution on node3</p><ul><li>Configuration Logstash</li></ul><pre>vi /etc/logstash/conf.d/filter-syslog.conf<br><br>...<br>filter {<br>  if [fields][log_name] == &quot;syslog&quot; {<br>    mutate {<br>      add_tag =&gt; [ &quot;syslog&quot; ]<br>    }<br>  }<br>}</pre><ul><li>Restart logstash service</li></ul><pre>systemctl restart logstash<br>systemctl status logstash</pre><p>Execution on node4 &amp; node5</p><pre># mv /etc/filebeat/filebeat.yml /etc/filebeat/filebeat.yml.original</pre><p>Config filebeat on node4</p><pre># vi /etc/filebeat/filebeat.yml<br>...<br>filebeat.inputs:<br>- type: log<br>  enabled: true<br>  paths:<br>    - /var/log/syslog<br>  fields:<br>    log_name: syslog<br><br>output.logstash:<br>  hosts: [&quot;IP_internal_node3:5044&quot;]<br>...</pre><p>Config filebeat on node5</p><pre># vi /etc/filebeat/filebeat.yml<br>...<br>filebeat.inputs:<br>- type: log<br>  enabled: true<br>  paths:<br>    - /var/log/messages<br>  fields:<br>    log_name: syslog<br><br>output.logstash:<br>  hosts: [&quot;IP_internal_VM_node3:5044&quot;]<br>...</pre><ul><li>Activate filebeat service</li></ul><pre># systemctl restart filebeat<br># systemctl status filebeat</pre><ul><li>Excecution on node3</li></ul><pre>root@node3:~# curl <a href="http://localhost:9200/_cat/indices?v">http://localhost:9200/_cat/indices?v</a><br>health status index                          uuid                   pri rep docs.co<br>unt docs.deleted store.size pri.store.size<br>green  open   .kibana_task_manager_1         M7mX7JkxRhqbRSFaZCZZ6w   1   0        <br>  2            1     43.5kb         43.5kb<br>green  open   .apm-agent-configuration       _zg4Oj8OT-mPis3Xmaf5lw   1   0        <br>  0            0       283b           283b<br>yellow open   syslog_node4_2020.01           zBnZ3VmORRyAVS37ozsC9A   1   1        <br>187            0    194.1kb        194.1kb<br>green  open   .kibana_1                      QOG6VQDFTzK0HXjeJQKRZQ   1   0        <br>  7            0     40.4kb         40.4kb<br>yellow open   syslog_node5.novalocal_2020.01 QXjp-0GVTDSrOFKuFOY8Ig   1   1        <br>856            0    376.1kb        376.1kb</pre><h4>Dashboard Kibana</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiqO2jmg_4SDO9qd_Ix7_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LC43t_DHWTij9-GhibkHVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zMvqeFjayXzSTZOc9xe1BQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_o0F8Sz-MhPfBqK0LkRtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ux_aeaV_Rz6iI8RdU2PkDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JhquJoQ6DUvjp8ObWd31tQ.png" /></figure><h4>Search Log</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bx6e5frheSLt210z0CNANw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2SbFtN1DAXniEUMD-fnHrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qiqzRxgqvsQyCYna7qqIJA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69d66d13527c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monitoring Prometheus dengan Grafana]]></title>
            <link>https://medium.com/@ahakimx/monitoring-prometheus-dengan-grafana-bae80b53f28a?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/bae80b53f28a</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[exporters]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[grafana]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Mon, 08 Jun 2020 21:38:24 GMT</pubDate>
            <atom:updated>2020-10-04T04:49:06.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jQ_nknBAUgkxCIKjDltC2g.jpeg" /></figure><p>Kali ini kita akan membahas mengenai monitoring prometheus dengan visualisasi grafana.</p><p><strong>Apa itu prometheus ?</strong></p><p>Prometheus adalah <em>open source</em>, sistem monitoring berbasis <em>metrics</em>. Prometheus mudah di gunakan serta memiliki model data yang <em>powerful</em> dan bahasa query yang dapat menganalisa aplikasi dan infrastruktur yang kita miliki.</p><p>Dengan format text yang sederhana membuatnya lebih mudah untuk mengekspos metrik ke prometheus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLCBDXagn4As8OzMlFvddA.png" /></figure><p><strong>Apa itu node exporter ?</strong></p><p>Eksporter adalah perangkat lunak yang di gunakan tepat di samping aplikasi yang ingin diperoleh metriknya. Eksporter menerima permintaan dari Prometheus, mengumpulkan data yang diperlukan dari aplikasi, mengubahnya menjadi format yang benar, dan kemudian mengembalikannya sebagai respons terhadap Prometheus.</p><p><strong>Apa itu Grafana ?</strong></p><p>Grafana adalah alat yang populer untuk membuat dashboard untuk berbagai sistem pemantauan dan non monitor, termasuk Graphite, InfluxDB, Elasticsearch, dan PostgreSQL. Ini adalah salah satu tools yang dapat digunakan untuk membuat dashboard saat menggunakan Prometheus.</p><p>Sekarang kita akan menginstall node exporter, prometheus dan grafana.</p><p>Kebutuhan :</p><ol><li>Node monitoring: node-monitoring (ip: 10.67.67.30, OS: Centos 7)</li><li>Node container: node-container (ip: 10.67.67.31, OS: Centos 7)</li></ol><h4>Lakukan pada node container</h4><p>Jika menggunakan firewall, buka port 9100 terlebih dahulu</p><pre># firewall-cmd --zone=public --permanent --add-port=9100/tcp<br># firewall-cmd --reload</pre><pre># cd /opt<br># wget h<a href="https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz">ttps://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.linux-amd64.tar.gz</a><br># tar xvfz node_exporter-0.18.1.linux-amd64.tar.gz<br># ./node_exporter --help<br># ./node_exporter</pre><pre>...<br>INFO[0000]  - netstat                                    source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - nfs                                        source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - nfsd                                       source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - pressure                                   source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - sockstat                                   source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - stat                                       source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - textfile                                   source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - time                                       source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - timex                                      source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - uname                                      source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - vmstat                                     source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - xfs                                        source=&quot;node_exporter.go:104&quot;<br>INFO[0000]  - zfs                                        source=&quot;node_exporter.go:104&quot;<br>INFO[0000] Listening on :9100                            source=&quot;node_exporter.go:170&quot;</pre><p>Akses browser http://10.67.67.31:9100/metrics :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lt_3DDk10J6o3bvBT8VSYg.png" /><figcaption>access metriks exporter node-container</figcaption></figure><p>Membuat node exporter sebagai service</p><pre># vi /etc/systemd/system/node_exporter.service<br><br>[Unit]<br>Description=Node Exporter<br><br>[Service]<br>User=root<br>ExecStart=/opt/node_exporter-0.18.1.linux-amd64/node_exporter<br><br>[Install]<br>WantedBy=default.target</pre><p>Menjalankan servis node exporter</p><pre># systemctl daemon-reload<br># systemctl enable node_exporter.service<br># systemctl start node_exporter.service<br># systemctl status node_exporter.service<br># journalctl -u node_exporter</pre><h4>Instalasi Prometheus</h4><p>Lakukan di node-monitoring</p><p>jika menggunakan firewall buka port 9090 terlebih dahulu</p><pre># firewall-cmd --zone=public --permanent --add-port=9090/tcp<br># firewall-cmd --reload</pre><pre># cd /opt<br># wget https://github.com/prometheus/prometheus/releases/download/v2.10.0/prometheus-2.10.0.linux-amd64.tar.gz<br># tar xvfz prometheus-2.10.0.linux-amd64.tar.gz<br># cd prometheus-2.10.0.linux-amd64<br># vi config.yml<br><br>global:<br>  scrape_interval:     15s<br>  evaluation_interval: 15s<br><br>scrape_configs:<br>  - job_name: &#39;prometheus&#39;<br>    static_configs:<br>    - targets: [&#39;10.67.67.30:9090&#39;]<br>  - job_name: &#39;node&#39;<br>    static_configs:<br>    - targets: [&#39;10.67.67.31:9100&#39;]</pre><p>Cek konfigurasi prometheus</p><pre># ./promtool check config config.yml<br># ./prometheus --web.listen-address 10.X0.X0.21:9090 --config.file /opt/prometheus-2.10.0.linux-amd64/config.yml</pre><p>Membuat prometheus sebagai servis</p><pre># vi /etc/systemd/system/prometheus_server.service<br><br>[Unit]<br>Description=Prometheus Server<br><br>[Service]<br>User=root<br>ExecStart=/opt/prometheus-2.10.0.linux-amd64/prometheus --web.listen-address 10.X0.X0.21:9090 --config.file /opt/prometheus-2.10.0.linux-amd64/config.yml<br><br>[Install]<br>WantedBy=default.target</pre><p>Jalankan prometheus</p><pre># systemctl daemon-reload<br># systemctl enable prometheus_server.service<br># systemctl start prometheus_server.service<br># systemctl status prometheus_server.service<br># journalctl -u prometheus_server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YNdXkgWFm2wrIQsdp0djPg.png" /><figcaption>prometheus target</figcaption></figure><h4>Install Grafana di node-monitoring</h4><p>Jika menggunakan firewall buka port 3000</p><pre># firewall-cmd --zone=public --permanent --add-port=3000/tcp<br># firewall-cmd --reload</pre><pre># cd /opt<br># wget https://dl.grafana.com/oss/release/grafana-6.2.5.linux-amd64.tar.gz <br># tar -zxvf grafana-6.2.5.linux-amd64.tar.gz <br># cd grafana-6.2.5<br># ./bin/grafana-server -homepath /opt/grafana-6.2.5 web</pre><p>Membuat grafana sebagai servis</p><pre># vi /etc/systemd/system/grafana.service<br><br>[Unit]<br>Description=Grafana<br><br>[Service]<br>User=root<br>ExecStart=/opt/grafana-6.2.5/bin/grafana-server -homepath /opt/grafana-6.2.5/ web<br><br>[Install]<br>WantedBy=default.target</pre><p>Jalankan grafana:</p><pre># systemctl daemon-reload<br># systemctl enable grafana.service<br># systemctl start grafana.service<br># systemctl status grafana.service<br># journalctl -u grafana</pre><p>Akses web browser <a href="http://10.67.67.30:3000/">http://10.67.67.30:3000</a></p><p>Credential grafana default:</p><pre>username : admin<br>password : admin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZC6k3oLixy9y4cjV6SqKg.png" /><figcaption>akses dashboard grafana</figcaption></figure><p>Menambahkan Data Source:</p><p>Masuk ke menu Configuration &gt; Data Source &gt; Add data source</p><p>Type &gt; Prometheus</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqknqvYY-s_yTo1KGLJKOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-JoOklkwAoeAapvnTJTdPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i6_znQeDY4CnV5eriZU-2w.png" /></figure><h4>Contoh:</h4><p>melihat uptime pada node</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKbdjZC9Za7zCXp30MbIRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCftSI43pvb0vRlV8F6ftQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZHEP2nJZPvvTyly4SDMd8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V19kCjVYPCy3pyUHvCm_Qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRuUAlbn33jdSky47DDBPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZPSptsfSv88UgJYw9xf5pQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Of5gzpmfdfH8MdM35ge7pg.png" /></figure><p>Sekian dan terimakasih.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bae80b53f28a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Docker Compose]]></title>
            <link>https://medium.com/@ahakimx/introduction-to-docker-compose-1bc0ef12f047?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bc0ef12f047</guid>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Mon, 25 May 2020 12:52:17 GMT</pubDate>
            <atom:updated>2020-05-25T12:52:17.864Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction to docker compose</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*yuWPtmXOsZD_wf6L5bEzhA.png" /><figcaption>source: <a href="https://d3oypxn00j2a10.cloudfront.net/0.18.0/img/homepage/docker-logo-cutoff.png">docker</a></figcaption></figure><blockquote>Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see <a href="https://docs.docker.com/compose/#features">the list of features</a>.</blockquote><blockquote>Compose works in all environments: production, staging, development, testing, as well as CI workflows. You can learn more about each case in <a href="https://docs.docker.com/compose/#common-use-cases">Common Use Cases</a>.</blockquote><p>Using Compose is basically a three-step process:</p><ul><li>Define your app’s environment with a Dockerfile so it can be reproduced anywhere.</li><li>Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.</li><li>Run docker-compose up and Compose starts and runs your entire app. source : <a href="https://docs.docker.com/compose/">https://docs.docker.com/compose/</a></li></ul><p><strong>Install compose</strong></p><pre>sudo curl -L <a href="https://github.com/docker/compose/releases/download/1.20.1/docker-compose-$(uname">https://github.com/docker/compose/releases/download/1.20.1/docker-compose-$(uname</a> -s)-$(uname -m) -o /usr/local/bin/docker-compose</pre><p><strong>Set permission executable</strong></p><pre>sudo chmod +x /usr/local/bin/docker-compose</pre><p><strong>Check docker-compose version</strong></p><pre>sudo docker-compose — version</pre><p><strong>Compose and Wordpress</strong></p><p><strong>create directory my_wordpress and enter the directory</strong></p><pre>mkdir /lab/my_wordpress<br>cd /lab/my_wordpress</pre><p><strong>create docker-compose.yml file</strong></p><pre>version: &#39;3.2&#39;</pre><pre>services:<br>   db:<br>     image: mysql:5.7<br>     volumes:<br>       - dbdata:/var/lib/mysql<br>     restart: always<br>     environment:<br>       MYSQL_ROOT_PASSWORD: somewordpress<br>       MYSQL_DATABASE: wordpress<br>       MYSQL_USER: [username]<br>       MYSQL_PASSWORD: [password]</pre><pre>wordpress:<br>     depends_on:<br>       - db<br>     image: wordpress:latest<br>     ports:<br>       - &quot;8000:80&quot;<br>     restart: always<br>     environment:<br>       WORDPRESS_DB_HOST: db:3306<br>       WORDPRESS_DB_USER: [username]<br>       WORDPRESS_DB_PASSWORD: [password]<br>volumes:<br>    dbdata:</pre><p><strong>run compose</strong></p><pre>sudo docker-compose up -d</pre><p><strong>View container</strong></p><pre>sudo docker container ls</pre><p><strong>Access Wordpress from browser</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vEOXrgPyT4p1aZPyfx9SLg.png" /><figcaption>Access wordpress on web browser</figcaption></figure><p>Thanks.</p><p>Reference:</p><p><a href="https://docs.docker.com/compose/"></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bc0ef12f047" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Jenkins -Install Jenkins]]></title>
            <link>https://medium.com/@ahakimx/introduction-to-jenkins-install-jenkins-fb77bbfc9916?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb77bbfc9916</guid>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sat, 21 Dec 2019 03:29:00 GMT</pubDate>
            <atom:updated>2019-12-21T03:29:00.659Z</atom:updated>
            <content:encoded><![CDATA[<p>How to install jenkins on centos 7</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*8m8uLGCp5XZluzeDyn1OtQ.png" /><figcaption>image source: <a href="https://jenkins.io/">jenkins.io</a></figcaption></figure><p><strong>install docker on centos</strong></p><pre>$ sudo yum install -y yum-utils \<br> device-mapper-persistent-data \<br> lvm2</pre><pre>$ sudo yum-config-manager --add-repo <a href="https://download.docker.com/linux/centos/docker-ce.repo">https://download.docker.com/linux/centos/docker-ce.repo</a></pre><pre><br>$ sudo yum -y install docker-ce docker-ce-cli containerd.io<br> <br>$ sudo systemctl start docker<br>$ sudo systemctl enable docker<br>$ sudo systemctl status docker<br> <br>$ usermod -aG docker nanox<br> <br></pre><p><strong>Install Docker Compose</strong></p><pre>$ sudo curl -L &quot;<a href="https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname">https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname</a> -s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose</pre><pre>$ chmod +x /usr/local/bin/docker-compose<br>$ docker-compose -v</pre><p><strong>Downloading the jenkins docker image</strong></p><pre>$ docker pull jenkins/jenkins</pre><pre>$ docker info | grep -i root<br> Docker Root Dir: /var/lib/docker</pre><pre>$ du -sh /var/lib/docker<br> 586M /var/lib/docker</pre><p><strong>create a docker compose file for jenkins</strong></p><pre>$ mkdir jenkins-data<br>$ mkdir jenkins_home<br>$ cd jenkins-data<br>$ vi docker-compose.yml</pre><pre>version: &#39;3&#39;<br>services:<br> jenkins:<br> container_name: jenkins<br> image: jenkins/jenkins<br> ports:<br> — &quot;8080:8080&quot;<br> volumes:<br> — $PWD/jenkins_home:/var/jenkins_home<br> networks:<br> — net<br>networks:<br> net:</pre><p><strong>Create a Docker container for jenkins</strong></p><pre>$ sudo chown 1000:1000 jenkins_home -R<br>$ docker-compose up -d<br>$ docker ps<br>CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES<br>cdcd15d0b313 jenkins/jenkins “/sbin/tini — /usr/…” 21 seconds ago Up 19 seconds 0.0.0.0:8080-&gt;8080/tcp, 50000/tcp jenkins</pre><pre>$ docker logs -f jenkins</pre><pre>save password -&gt; <br>1c94a093462e46cab76f33exxxx</pre><p>open browser <a href="http://192.168.88.24:8080/">http://192.168.88.24:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6aKQObKFwHAX0RfmFDCsQ.png" /></figure><p>install suggested plugins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6sWVsmIEpOdqmMaKQYz1cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DMYCZw1wOOoUElHVV4AdTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-2W_ZpOIxW6UzZ_SCE-Sw.png" /></figure><p>Thanks..</p><p>Reference: <a href="https://docs.docker.com/install/linux/docker-ce/centos/">https://docs.docker.com/install/linux/docker-ce/centos/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb77bbfc9916" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overlay Network without Swarm mode]]></title>
            <link>https://medium.com/@ahakimx/overlay-network-without-swarm-mode-586318724c62?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/586318724c62</guid>
            <category><![CDATA[swarm]]></category>
            <category><![CDATA[docker-networking]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sun, 21 Jul 2019 15:24:48 GMT</pubDate>
            <atom:updated>2019-07-21T15:24:48.286Z</atom:updated>
            <content:encoded><![CDATA[<p>Overlay network without swarm mode</p><blockquote>The overlay network driver creates a distributed network among multiple Docker daemon hosts. This network sits on top of (overlays) the host-specific networks, allowing containers connected to it (including swarm service containers) to communicate securely. Docker transparently handles routing of each packet to and from the correct Docker daemon host and the correct destination container. see detail <a href="https://docs.docker.com/network/overlay/">https://docs.docker.com/network/overlay/</a></blockquote><p>This way of using overlay networks is not recommended for most Docker users. It can be used with standalone swarms and may be useful to system developers building solutions on top of Docker. It may be deprecated in the future. source: <a href="https://docs.docker.com/v17.09/engine/userguide/networking/#an-overlay-network-without-swarm-mode">https://docs.docker.com/v17.09/engine/userguide/networking/#an-overlay-network-without-swarm-mode</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*qb-KM7dRM7ZqmuJj0ZI5NA.png" /><figcaption>Network Graph</figcaption></figure><p><strong>On pod67-node0 run key-value store consul</strong></p><pre>sudo docker run -d -p 8500:8500 -h consul --name consul progrium/consul -server -bootstrap</pre><p><strong>On pod67-node1 and pod67-node2 disable docker service and run docker from CLI</strong></p><pre>sudo systemctl stop docker</pre><pre>sudo systemctl status docker</pre><pre>sudo dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-advertise ens3:2375 --cluster-store consul://10.1.67.100:8500 &amp;</pre><p><strong>On pod67-node1 create overlay network</strong></p><pre>sudo docker network create -d overlay — subnet=192.168.67.0/24 my-overlay</pre><p><strong>View networks</strong></p><pre>sudo docker network ls</pre><p><strong>on pod67-node1 create container alpine1 connect to my-overlay network</strong></p><pre>sudo docker run -dit --name alpine1 --network my-overlay alpine ash</pre><p><strong>On pod67-node2 create container alpine2 connect to my-overlay network</strong></p><pre>sudo docker run -dit --name alpine2 --network my-overlay alpine ash</pre><p><strong>On pod67-node2, view my-overlay network details</strong></p><pre>sudo docker network inspect my-overlay</pre><p><strong>On pod67-node2 enter the alpine2 container and ping to the IP address alpine1 container</strong></p><pre>sudo docker attach alpine2<br>ping -c 3 192.168.67.2<br>ping -c 3 alpine1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*lmsfUsujZTpTI-fhDcPjsg.png" /><figcaption>test ping to alpine1</figcaption></figure><p>reference :</p><p><a href="https://docs.docker.com/v17.09/engine/userguide/networking/#an-overlay-network-without-swarm-mode">https://docs.docker.com/v17.09/engine/userguide/networking/#an-overlay-network-without-swarm-mode</a></p><p><a href="https://docs.docker.com/network/bridge/">https://docs.docker.com/network/bridge/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=586318724c62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[User Defined Bridge on Docker Network]]></title>
            <link>https://medium.com/@ahakimx/user-defined-bridge-on-docker-network-32611ed63acf?source=rss-684547fb6a2f------2</link>
            <guid isPermaLink="false">https://medium.com/p/32611ed63acf</guid>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Abdul Hakim]]></dc:creator>
            <pubDate>Sun, 21 Jul 2019 15:16:44 GMT</pubDate>
            <atom:updated>2019-07-21T15:16:44.581Z</atom:updated>
            <content:encoded><![CDATA[<p>User defined bridge on docker network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*OOUJ3NyR6CbK368ImSbo8A.png" /><figcaption>source image : deploybot.com</figcaption></figure><h3>Differences between user-defined bridges and the default bridge</h3><blockquote><strong>User-defined bridges provide better isolation and interoperability between containerized applications</strong>.</blockquote><p>Containers connected to the same user-defined bridge network automatically expose <strong>all ports</strong> to each other, and <strong>no ports</strong> to the outside world. This allows containerized applications to communicate with each other easily, without accidentally opening access to the outside world.</p><blockquote><strong>User-defined bridges provide automatic DNS resolution between containers</strong>.</blockquote><p>Containers on the default bridge network can only access each other by IP addresses, unless you use the <a href="https://docs.docker.com/network/links/">--link option</a>, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias.</p><blockquote><strong>Containers can be attached and detached from user-defined networks on the fly</strong>.</blockquote><p>During a container’s lifetime, you can connect or disconnect it from user-defined networks on the fly. To remove a container from the default bridge network, you need to stop the container and recreate it with different network options.</p><blockquote><strong>Each user-defined network creates a configurable bridge</strong>.</blockquote><p>User-defined bridge networks are created and configured using docker network create. If different groups of applications have different network requirements, you can configure each user-defined bridge separately, as you create it.</p><blockquote><strong>Linked containers on the default bridge network share environment variables</strong>.</blockquote><p>Containers connected to the same user-defined bridge network effectively expose all ports to each other. For a port to be accessible to containers or non-Docker hosts on different networks, that port must be <em>published</em> using the -p or --publish flag. source: <a href="https://docs.docker.com/network/bridge/">https://docs.docker.com/network/bridge/</a></p><p><strong>Create bridge network</strong></p><pre>sudo docker network create --driver bridge alpine-net</pre><p><strong>View the network list</strong></p><pre>sudo docker network ls</pre><p><strong>View the alpine-net network details</strong></p><pre>sudo docker network inspect alpine-net</pre><blockquote><strong>Create 3 container with:</strong></blockquote><blockquote>1. alpine1 container connect to default bridge network</blockquote><blockquote>2. alpine2 container connect to alpine-net network</blockquote><blockquote>3. alpine3 container connect to network default bridge and alpine-net</blockquote><pre>sudo docker run -dit --name alpine1 alpine ash</pre><pre>sudo docker run -dit --name alpine2 --network alpine-net alpine ash</pre><pre>sudo docker run -dit --name alpine3 alpine ash</pre><pre>sudo docker network connect alpine-net alpine3</pre><p><strong>View network bridge details</strong></p><pre>sudo docker network inspect bridge</pre><p><strong>view network alpine-net details</strong></p><pre>sudo docker network inspect apline-net</pre><p><strong>Enter the alpine3 container and ping alpine1 ip, alpine1 and alpine2 name</strong></p><pre>sudo docker attach alpine3</pre><p>ping IP alpine1</p><pre>ping -c 3 172.17.0.2</pre><p>ping name alpine1</p><pre>ping -c 3 alpine1</pre><p>ping alpine2 name</p><pre>ping -c 3 alpine2</pre><p><strong>Enter the alpine2 and ping to alpine1 IP and ping to the internet</strong></p><pre># ping -c 3 172.17.0.2</pre><p>failed, because different bridge network and subnet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*Cf9muXUHghGHQ6Anx4NObA.png" /><figcaption>ping internet succeed</figcaption></figure><p>ping internet will be succeed.</p><pre># ping -c 3 8.8.8.8</pre><p>ping internet will be succees.</p><p>reference : <a href="https://docs.docker.com/network/bridge/">https://docs.docker.com/network/bridge/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32611ed63acf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>