DevOps vs Agile – Sesame Disk https://sesamedisk.com Tue, 14 Jun 2022 01:59:46 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.3 https://sesamedisk.com/wp-content/uploads/2020/05/cropped-favicon-transparent-32x32.png DevOps vs Agile – Sesame Disk https://sesamedisk.com 32 32 Deploy WordPress on K8s; Kubernetes & WP https://sesamedisk.com/deploy-wordpress-on-k8s/ https://sesamedisk.com/deploy-wordpress-on-k8s/#comments Mon, 07 Mar 2022 02:51:59 +0000 https://sesamedisk.com/?p=5326 kubernetes nodes for wp

In this post, you will learn to deploy WordPress on k8s (Kubernetes) managed from DigitalOcean. WordPress is a popular content management system (CMS) for creating websites easily. By using PHP and MySQL to support WordPress in building a content management system, we can create many websites, blogs, and other website-based applications by learning how to deploy WordPress on Kubernetes nodes.

You can install WordPress on your own server and register on the WordPress site. After this, you will be able to do that easily.

Prepare Kubernetes Cluster To Deploy WordPress

In this tutorial, we use a Kubernetes managed service from DigitalOcean to run WordPress on Kubernetes. I have already set up the nodes on DigitalOcean; you need to prepare kubectl tools to make the Kubernetes nodes remotely.

You can see a tutorial for installing kubectl on Kubernetes.io for all Platform OS. Then, on the DigitalOcean dashboard, you will see the guide on how to import config Kubernetes nodes.

I have imported the config from the Kubernetes nodes mentioned; this can be verified using the command below.

$ kubectl get nodes
NAME                      STATUS   ROLES    AGE    VERSION
sgx-do-kubernetes-u41z8   Ready    <none>   139m   v1.21.9
sgx-do-kubernetes-u41zu   Ready    <none>   139m   v1.21.9

Install ingress Nginx

The Kubernetes nodes are ready to deploy applications in this step. But, you must still set up an ingress controller for the load-balance TCP service on the container pods. I will use helm to install the ingress controller Nginx on the nodes. Therefore, you can visit the helm website for installation.

$ helm upgrade --install ingress-nginx ingress-nginx \
>   --repo https://kubernetes.github.io/ingress-nginx \
>   --namespace ingress-nginx --create-namespace

Congratulations! You have successfully installed the ingress controller Nginx– the first step is already down. Now, the next step is pointing the IP from ingress to your domain.

Then, you can use the domain wordpress.you_domain.com to be the Public IP Ingress!

Install Cert-Manager

We use cert-manager to manage and create certificate SSL. Using cert-manager, we can create “SSL letsencrypt.”

Letsencrypt is reliable to our website become secure connections. We use jetstack repository to install cert-manager. If you install jetstack, the first step is to update the jetstack repository.

$ helm repo add jetstack https://charts.jetstack.io
"jetstack" has been added to your repositories

After that, the first time you update the jetstack repository using helm, you can update helm repository to install the cert-manager.

$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "jetstack" chart repository
Update Complete. ⎈Happy Helming!⎈

By now, you have already prepared helm and repository to install cert-manager. At this step, the cert-manager requires CRD to run properly.

$ helm install \
>   cert-manager jetstack/cert-manager \
>   --namespace cert-manager \
>   --create-namespace \
>   --version v1.7.1 \
>   --set installCRDs=true

Prepare Secret to Deploy WordPress

To run pods properly, you can prepare a secret generator which you will have to configure in the kustomizaton.yaml. This secret contains sensitive information about passwords and databases for MySQL and WordPress.

At this point, create a kustomization.yaml file using any text editor you like. Then, you can fill in a password with high security or one you prefer.

secretGenerator:
- name: mysql-password
  literals:
  - password=Mysql.Root2021@
- name: mysql-user
  literals:
  - username=userwp
- name: mysql-user-password
  literals:
  - passworduser=Mysql.User2021@
- name: mysql-database
  literals:
  - database=multitenant_wp

I have created a secret generator on kustomization.yaml; later, I will deploy the secret generator into the Kubernetes node.

$ kubectl apply -k .
secret/mysql-database-4f74mgddt5 created
secret/mysql-password-f547bhm8mc created
secret/mysql-user-4t5mcf8dkm created
secret/mysql-user-password-9m7k5b4k2m created

Volume in the Kubernetes

Volume in Kubernetes has two resources namely PersistentVolume and PersistentVolumeClaim. PersistentVolume is storage defined by the administrator as a storage container for applications to save data applications created on a Kubernetes cluster or a cloud provider that provides volume storage.

A PersistentVolumeClaim is a type of storage, like pods, that consumes resources in Kubernetes such as memory and CPU– that can claim the size and access mode to create volumes with specific access modes. PersistentVolumeClaim can be configured as read-write or read-only access.

In the next step, we need to create a persistent volume and persistent claim volume which is used to store MySQL database and WordPress files.

How to Create MySQL Volumes

Initially, create a PersistentVolume with the filename mysql-pv-volume.yaml for the MySQL database.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: mysql-pv
spec:
  storageClassName: do-block-storage
  capacity:
    storage: 20Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/var/lib/mysql"

Then, create a PersistentVolumeClaim, named as mysql-pv-claim.yaml.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mysql-pv-claim
spec:
  storageClassName: do-block-storage
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi

Cool! How about deploying the volumes now?

Well, let’s deploy both MySQL PersistentVolume files to the Kubernetes service now!

$ kubectl apply -f mysql-pv-volume.yaml 
persistentvolume/mysql-pv created
$ kubectl apply -f mysql-pv-claim.yaml 
persistentvolumeclaim/mysql-pv-claim created

To see that they have been deployed on Kubernetes, use this command below.

$ kubectl get pv
check status of wp deploy

Deploying More WordPress Volumes

Create a file named wordpress-pv-volume.yaml to make a PersistentVolume WordPress in the Kubernetes nodes so that we can store files and images for the WordPress container.

apiVersion: v1
kind: PersistentVolume
metadata:
  name: wordpress-pv
spec:
  storageClassName: do-block-storage
  capacity: 
    storage: 30Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/var/www"

Create a file named wordpress-pv-claim.yaml for creating PersistentVolumeClaim on WordPress.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: wordpress-pv-claim
spec:
  storageClassName: do-block-storage
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi

Deploy the persistent volume storage that we created for WordPress to Kubernetes nodes.

$ kubectl apply -f wordpress-pv-volume.yaml 
persistentvolume/wordpress-pv created
$ kubectl apply -f wordpress-pv-claim.yaml 
persistentvolumeclaim/wordpress-pv-claim created

Let’s see the PersistentVolume WordPress using this command.

$ kubectl get pv
PV (persistent volume) to deploy WordPress on k8s

Secret in Kubernetes

Secret in Kubernetes is a crucial part that stores password, token or key information. Storing secret very important information into a secret makes it more secure and secure and flexible when compared to what we define in pods in Kubernetes. To use secret pods, Kubernetes must define a secret for a service.

Configure Secret to MySQL Service

It’s time we configure the secret on MySQL service, create a yaml file mysql-service.yaml. Let’s add the secret we have created.

We need to check the secret on the nodes, for that check the secret using the command “kubectl describe secret “. Match secret with name secretKeyRef in yaml config.

apiVersion: v1
kind: Service
metadata: 
  name: mysql-wp
spec:
  ports:
    - port: 3306
  selector:
    app: wordpress
    tier: mysql
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql-wp
spec:
  selector:
    matchLabels:
      app: wordpress
      tier: mysql
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
        tier: mysql
    spec:
      containers:
      - image: mysql:latest
        name: mysql
        env:
        - name: MYSQL_ROOT_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql-password-f547bhm8mc
              key: password
        - name: MYSQL_USER
          valueFrom:
            secretKeyRef:
              name: mysql-user-4t5mcf8dkm
              key: username
        - name: MYSQL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql-user-password-9m7k5b4k2m
              key: passworduser
        - name: MYSQL_DATABASE
          valueFrom:
            secretKeyRef:
              name: mysql-database-4f74mgddt5
              key: database
        ports:
        - containerPort: 3306
          name: mysql
        volumeMounts:
        - name: persistent-storage
          mountPath: /var/lib/mysql
      volumes:
      - name: persistent-storage
        persistentVolumeClaim:
          claimName: mysql-pv-claim

Make sure all the secret and services are adjusted, we just need to deploy mysql-service.yaml to kubernetes nodes.

$ kubectl apply -f mysql-service.yaml 
service/mysql-wp created
deployment.apps/mysql-wp created

ConfigureSsecret to Deploy WordPress on K8s Service

You have already created a persistent storage volume and secret on nodes Kubernetes at this point. Now, let’s add a secret configuration to the WordPress service. Hence, create a service and deployment to deploy WordPress containers to Kubernetes nodes. Create a yaml configurationv file called wordpress-service.yaml. Match the secret with secretKeyRef on the Kubernetes nodes.

apiVersion: v1
kind: Service
metadata:
  name: wordpress
spec:
  ports:
    - port: 80
  selector:
    app: wordpress
    tier: web
  type: LoadBalancer

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: wordpress
spec:
  selector:
    matchLabels:
      app: wordpress
      tier: web
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: wordpress
        tier: web
    spec:
      containers:
      - image: wordpress:php8.1-apache
        name: wordpress
        env:
        - name: WORDPRESS_DB_HOST
          value: mysql-wp:3306
        - name: WORDPRESS_DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql-user-password-9m7k5b4k2m
              key: passworduser
        - name: WORDPRESS_DB_USER
          valueFrom:
            secretKeyRef:
              name: mysql-user-4t5mcf8dkm
              key: username
        - name: WORDPRESS_DB_NAME
          valueFrom:
            secretKeyRef:
              name: mysql-database-4f74mgddt5
              key: database
        ports:
        - containerPort: 80
          name: wordpress
        volumeMounts:
        - name: persistent-storage
          mountPath: /var/www/html
      volumes:
      - name: persistent-storage
        persistentVolumeClaim:
          claimName: wordpress-pv-claim

Cool, cool! How about that? After all, since you have completed the WordPress deployment secret and service, you can deploy yaml config to Kubernetes nodes.

$ kubectl apply -f wordpress-service.yaml 
service/wordpress created
deployment.apps/wordpress created

To check service WordPress and MySQL, you can use this command:

services to deploy WordPress on k8s

Configure letsencrypt to Deploy WordPress on K8s

In this part of this post, let’s create an SSL letsencrypt issuer on the Kubernetes nodes. The issuer will help us generate and renew letsencrypt certificates. Moreover, letsencrypt is useful to make a website secure. It provides open-source SSL certificates to create HTTPS on every website in the world. Then, let’s create a file called wp_production_issuer.yaml and fill this below.

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata: 
  name: wp-prod-issuer
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: [email protected]
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
      - http01:
          ingress:
            class: nginx

After that, deploy wp_production_issuer.yaml on the Kubernetes nodes.

$ kubectl apply -f wp_production_issuer.yaml 
clusterissuer.cert-manager.io/wp-prod-issuer created

Configure ingress HTTPS and Deploy WordPress on K8s

Since you have already deployed the issuer letsencrypt certificates to Kubernetes nodes, create an ingress so that WordPress can use the HTTPS. I have used domain wordpress.example.net in the ingress configuration which will use SSL letsencrypt so that the wordpress.example.net domain can be accessed using HTTPS. Firstly, we pointed the IP from the ingress controller Nginx to the destination domain to run the WordPress service. After that, create wordpress_ingress.yaml for configuring ingress WordPress.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: wordpress
  annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: "wp-prod-issuer"
spec:
  rules:
  - host: wordpress.example.net
    http:
     paths:
     - path: "/"
       pathType: Prefix
       backend:
         service:
           name: wordpress
           port:
             number: 80
  tls:
  - hosts:
    - wordpress.example.net
    secretName: wordpress-tls

Deploy wordpress_ingress.yaml to Kubernetes nodes.

$ kubectl apply -f wordpress_ingress.yaml 
ingress.networking.k8s.io/wordpress created

Deploy WordPress Successfully on Kubernetes

How about that? You have successfully configured WordPress and deployed it into Kubernetes. Now, it’s time for us to open the domain previously configured on ingress WordPress.

Use the domain wordpress.example.net for this. So, this can be opened on any browser. But first, make sure the WordPress application can run on our browser.

WordPress appears to be working fine as you can see in the image (if you face any errors, let me know in the comments). Then, choose the language. Select English and then continue.

wordpress configure

Then, it will appear to fill in the Site title, username, password, and email. You can also make your WordPress site not be indexable by search engines by checking the option at the bottom. After you have filled everything in according to your needs, proceed to finish installing WordPress.

login to WordPress on k8s

Can you log in to the WordPress site that you deployed on Kubernetes? If yes, it should look like the image shown below. If not, re-read this article and see if you made any mistakes. But if you still cannot fix it, let me know in the comments.

deploy wordpress on k8s cluster

Congratulations, after logging in with the username and password created earlier, you should see the WordPress dashboard site. Therefore, you can work on it as you please now.

Conclusion

WordPress is a powerful content management system for us as landing pages and blogs, apart from being open source, we can also build WordPress anywhere and deploy WordPress on Kubernetes nodes. Isn’t that cool?

If we need a WordPress site with a high load, we can build WordPress on Kubernetes by adjusting the scaling of pods. Aside you can use the Horizontal Pod Autoscaler HPA to scale horizontally based on CPU and even other metrics. Kubernetes is very helpful for building highly loaded applications. If you don’t know how to set up Kubernetes on a Linux server, you can check this article Kubernetes: k8s setup and run apps before learning how to deploy WordPress on Kubernetes nodes. Let me plug something else; we also have a posts to deploy a Video Conferencing Platform using Jist in K8s.

In conclusion, if you liked this post or found it to be informative, please like it. Feel free to share it with your friends who may be just starting out or like working with WordPress or Kubernetes. Moreover, drop a comment with any queries you might have related to this post. I will do my best to answer all of you and help you.

Please let me know if you want to see more Kubernetes-related posts in the future? If not, what interests you?

Edited by: Syed Umar Bukhari

]]>
https://sesamedisk.com/deploy-wordpress-on-k8s/feed/ 3
Cloud and DevOps: A match made in heaven https://sesamedisk.com/cloud-and-devops-a-relationship-between-both/ https://sesamedisk.com/cloud-and-devops-a-relationship-between-both/#respond Mon, 18 Oct 2021 08:51:24 +0000 https://sesamedisk.com/?p=4003 How the relationship between Cloud and DevOps affects the industry.

The cloud and DevOps are the new kids on the block. They might not be what you expect, but together they make a good team. Cloud is known for providing scalable resources and DevOps is known for automation of deployment processes. Together these two technologies will help to implement new software faster than ever before!
The relationship between cloud and DevOps is like that of peanut butter and jelly- it just makes sense! 😂 Imagine your company having all of its resources in one place, such as Amazon Web Services (AWS). Now imagine how much time you would save if there was no need to purchase physical servers or spend hours configuring them individually. This dream becomes reality thanks to our favorite tech couple: Cloud and DevOps 😍

Development teams look for new tools, methods, and approaches for developing and delivering the most advanced technologies every day. For many of today’s most creative innovators, the cloud offers a scalable and adaptable route to success. It provides novel security, automation, and development options. Integrating DevOps into the cloud enables businesses to compete more effectively in a complex and ever-changing industry. Rather than reinventing DevOps, effective cloud integration requires implementing and adopting best engineering practices.

In this article, we’ll look at what DevOps is and how it works, as well as the connection between cloud and DevOps, cloud-based DevOps solutions, and the benefits of cloud-based DevOps solutions.

What is DevOps?

DevOps is a technique that companies use to manage the development and release of software. DevOps is a methodology for rapidly providing services and applications. The development approach combines software development and operations into a unified process emphasizing automation and efficiency.

The goal of DevOps is to have frequent incremental improvements rather than periodic significant releases. This method enables businesses to produce higher-quality software products more smoothly and effectively.

DevOps Best Practices
DevOps Best Practices

The primary benefits of DevOps in today’s environment are as follows:

  • Effective application release automation 
  • Infrastructure automation choices
  • CI/CD
  • Rapid Delivery with Agile frameworks
  • Rapid issue resolution

How DevOps works?

Development and operations teams do not divide themselves in the DevOps environment, as they would be in traditional development setups. In specific scenarios, these two teams combine to form a single unit where engineers may work throughout the entire development lifecycle, from development to deployment and operations.

Here, you may acquire a variety of talents unrelated to any particular role. Security mechanisms and quality assurance may become increasingly engaged in the application development lifecycle in some instances. When everyone on a DevOps team focuses on security, the team becomes a DevSecOps solution.

In a DevOps environment, teams use a variety of techniques to automate formerly laborious and slow operations. They use the most advanced technology available to accelerate the development of apps. For example, in DevOps, automating tasks like code deployment and infrastructure provisioning that previously needed assistance from other teams to improve the team’s pace.

What is the relationship between DevOps and Cloud?

Both cloud computing and DevOps have plenty of other advantages in the area of the agile enterprise. Cloud technology enables businesses to access an infinite number of features and solutions at their own pace. There is no limit to the amount of capability that a company may access through the cloud. Cloud technology enables rapid feature upgrades and enhancements in any setting.

Similarly, DevOps fosters an agile workplace for all parties involved. Both systems provide distinct advantages in terms of speed and production. However, when cloud and DevOps combine, their capabilities complement one another, resulting in an even more attractive solution.

The cloud enables centralized deployments and may include built-in DevOps assistance. For instance, if DevOps teams are required to build the components of a solution in a particular manner, the cloud’s sophisticated automation capabilities may help simplify and repeat the process.

Cloud-Based DevOps Tools

Nowadays, you can operate your complete DevOps stack in the cloud through cloud-managed DevOps solutions. We have discussed two of the most popular ones: Azure DevOps and AWS DevOps.

Azure Cloud and DevOps

Azure DevOps
Microsoft Azure

Microsoft’s integrated DevOps platform is Azure DevOps (previously known as Visual Studio Team System or VSTS). It allows you to manage the whole of your DevOps cycle via a single integrated interface. While Azure DevOps Services is a cloud-based DevOps solution that you may use as a SaaS (Software-as-a-Service) application, Azure DevOps Server is a self-hosted on-premises version of the same product.

Microsoft’s DevOps solution comprises several products, each of which addresses a unique step of your process. Azure Boards enable planning and project management. The Azure Pipeline is a continuous integration and delivery tool. Azure Repos provides cloud-hosted Git repositories, Azure Test Plans is a testing toolkit, and Azure Artifacts enable the creation, management, and deployment of packages.

However, you don’t need to utilize all of the tools included in Azure DevOps Services; you may alternatively subscribe to them separately. If you need more capabilities, the Visual Studio Marketplace has over 1,000 Azure DevOps extensions, including integrations, statistics, visualizations, and crash reporting.

AWS Cloud and DevOps

AWS & DevOps

AWS DevOps is a service offered by Amazon Web Services that consists of a collection of integrated DevOps tools for managing the entire software development lifecycle. While AWS is mainly utilized in the cloud, you can also run all the tools on-premises using AWS Outposts, which enable you to deploy any AWS infrastructure component on your in-house server.

In contrast to Azure DevOps Services, a PaaS (Platform-as-a-Service) solution, AWS is an IaaS (Infrastructure-as-a-Service) solution, which means it is connected to the underlying infrastructure. While packages may be deployed from Azure DevOps Platform to another environment, such as AWS, the opposite is not feasible. You can only deploy to AWS infrastructure through AWS DevOps, such as EC2 (Elastic Compute Cloud) or S3 (Simple Storage Service).

AWS DevOps toolset includes:

  • A continuous integration/continuous delivery service called AWS CodePipeline.
  • A managed service build tool called AWS CodeBuild.
  • A deployment automation tool called AWS CodeDeploy.
  • A platform for managing DevOps projects called AWS CodeStar.

In general, AWS DevOps is probably the most refined DevOps platform for existing or prospective Amazon Web Services customers.

Which one to choose between Azure and AWS?

The primary distinction between the Azure and AWS DevOps toolsets is how they integrate with their respective platforms. Both products, for obvious reasons, combine the appearance and feel of their different cloud platform’s user interfaces. AWS DevOps is much simpler to get started with, while the Azure DevOps suite is more integrated across the various Azure DevOps toolsets and has a considerably more extensive set of integrations with the whole Azure Marketplace.

Moreover, upon choosing, it all comes down to what your employer thinks. That is, whatever job you get is of primary importance. If the sole job available targets Azure systems, then focus on completing an Azure DevOps certification. On the other hand, the industry has shifted toward AWS. Many companies and hiring managers prefer individuals with an AWS-based DevOps certification, owing to AWS’s increasing market dominance and various other fundamental options that perform better when AWS systems are used.

Apart from that, it all comes down to your work needs and which one you believe is most advantageous for you since this is the only way to choose between the two and seek a source of DevOps certifications.

Advantages of cloud computing DevOps

Cloud solutions and DevOps complement one another well in an environment designed for agility and adaptability. When DevOps and cloud computing are integrated, they can significantly improve the software development lifecycle. Businesses that use DevOps in the cloud may improve software delivery performance by an average of 81 percent.

The following are the primary advantages of cloud-based DevOps:

Automation options based on the cloud

Automation is a critical component of DevOps efficiency. Numerous cloud platforms provide sophisticated automation capabilities for DevOps operations, such as continuous development and integration. These technologies provide uniformity and efficiency while requiring less human involvement.

Centralized platform

The cloud offers a centralized framework from which businesses can manage all aspects of their production workloads, including testing, deployment, monitoring, and operation. This enables you to keep track of everything in one location. When all of your DevOps information is in one place, it’s simpler to manage compliance and security. This way, you may get even more actionable insights and business information.

Scalable infrastructure

The cloud is the most cost-effective method to guarantee that you can scale up or down any infrastructure required without spending a fortune on equipment. As a result of this scalability, DevOps is a highly effective way to roll out new features, functionality, and possibilities as your company develops. You can mix cloud computing with DevOps agility to provide limitless development possibilities for your organization.

Agile development

The cloud can offer a variety of staging and testing servers, allowing DevOps teams to continue working while waiting for servers to become available. Utilizing DevOps across the cloud environment enables teams to experiment more freely since builds may occur more often. DevOps teams can rapidly provision servers that meet their requirements.

Reliability and stability

Since cloud providers emphasize availability and stability, they can manage and maintain all aspects of the platform. Instead of worrying about these problems, IT firms can concentrate on product development, which results in better product performance, user experience, and speed to market. The key to success, in this case, is selecting a cloud provider capable of delivering the appropriate degree of uptime for your company.

Conclusion

Cloud computing, on its whole, has risen in popularity over the last several years. Businesses of all sizes can discover how a cloud environment enables them to develop at their speed. Just as cloud communications continue to increase in popularity, cloud-based development and application management procedures become more attractive as your team realizes the full advantages of cloud-based DevOps.

Later, you’ll find that you’re using various DevOps techniques to increase the efficiency of your whole workforce. When this occurs, your team’s performance and efficiency are sure to soar.  There are no limits to what your DevOps team and the cloud can achieve with the proper cloud provider guiding and supporting you.

]]>
https://sesamedisk.com/cloud-and-devops-a-relationship-between-both/feed/ 0
Fixing jitsi recording unavailable on docker https://sesamedisk.com/fixing-recording-unavailable-on-jitsi-docker/ https://sesamedisk.com/fixing-recording-unavailable-on-jitsi-docker/#respond Fri, 23 Jul 2021 02:55:29 +0000 https://sesamedisk.com/?p=2704 Recording unavailable jitsi

This post “Fixing jitsi recording unavailable on docker” was updated by: Syed Umar Bukhari on October 5, 2021

Many organizations and engineers are creating video conferencing apps during the covid-19 pandemic for online learning facilities, webinars, and for talking to loved ones– this is where Jitsi comes in. Jitsi is a free video conferencing alternative app to Zoom— it is also open source!

Why Should You Use A Video Conferencing App?

Conferencing apps have gained a major role lately; it is a need that one cannot miss out on anymore, especially during this pandemic. Because of these apps, you can meet and share tutorials, conduct business meetings, record your work plans, etc.

Also, the recording feature will always be important in building a video conferencing tool.

How To Enable Recording On Jitsi?

As a first step, let’s check the configuration on the server– so that Jitsi can create recordings during the conference.

Firstly, enable Jibri because it has a configuration for recordings to run well on Jitsi. If you don’t know how to install Jitsi on Docker yet, please read our article on Jitsi with Docker.

If recording is unavailable on Jitsi, check Github for Jitsi recording fails. To observe what happens to the Jibri container, check the container logs on Jibri (jibri logs) with:

docker-compose logs container_name

docker-compose -f docker-compose.yml -f jibri.yml logs jibri
jibri container logs

As you can see, jibri logs have a problem in the container. After this, check the container process with a command that is is useful for viewing all running container processes:

docker-compose -f docker-compose -f jibri.yml ps

docker-compose -f docker-compose.yml -f jibri.yml ps
process docker-compose jitsi

As you can see, the Jibri container is not running properly, since the container keeps restarting. If you see similar results, keep reading to understand and fix this error.

Fixing The Jibri Container

The first step to fixing the Jibri Container is checking the status of the alsa-loopback module on the server. Jibri uses this module to make recordings run fast on the server. Check alsa-loopback module with this command:

arecord

arecord -L
arecord command jitsi

Checking The Kernel

As the alsa-loopback module doesn’t work properly, let’s check the kernel. The goal here is to find out if the generic kernel is installed or not.

uname -r
check kernel generic

However, it looks like the generic kernel is already installed on the server. Hence, instead, try to enable the alsa-loopback module.

Activate it with this:

sudo modprobe snd-aloop

After enabling the alsa-loopback module with modprobe, let’s check the server to see if the alsa-loopback module is active. To check the status, use this command:

arecord -L

This is useful for viewing the module’s driver– which is already active on the server.

arecord command

You can get the module running without modprobe on the server in a way that when you reboot the server, the module will still continue to run on the server.

Adding snd-aloop to the

~/etc/modules file

with the “echo and tee” command makes it easier to use.

echo snd-aloop | tee -a /etc/modules
Adding module snd-aloop

Note: This issue with the lsa-loopback module is common as some cloud providers do not provide generic kernels capable of meeting Jitsi’s requirements. In this case, while we already had the generic kernel installed, the alsa-loopback module was not set active.

Configuration of Jibri

After that, update the config on jibri.yml– the file that is used to create a Jibri container.

version: '3'

services:
    jibri:
        image: jitsi/jibri:latest
        restart: ${RESTART_POLICY}
        volumes:
            - ${CONFIG}/jibri:/config:Z
            - /dev/shm:/dev/shm
        cap_add:
            - SYS_ADMIN
            - NET_BIND_SERVICE
        devices:
            - /dev/snd:/dev/snd
        environment:
            - PUBLIC_URL
            - XMPP_AUTH_DOMAIN
            - XMPP_INTERNAL_MUC_DOMAIN
            - XMPP_RECORDER_DOMAIN
            - XMPP_SERVER
            - XMPP_DOMAIN
            - JIBRI_XMPP_USER
            - JIBRI_XMPP_PASSWORD
            - JIBRI_BREWERY_MUC
            - JIBRI_RECORDER_USER
            - JIBRI_RECORDER_PASSWORD
            - JIBRI_RECORDING_DIR
            - JIBRI_FINALIZE_RECORDING_SCRIPT_PATH
            - JIBRI_STRIP_DOMAIN_JID
            - JIBRI_LOGS_DIR
            - DISPLAY=:0
            - TZ
        depends_on:
            - jicofo
        networks:
            meet.busanid.dev:

The file looks all set– only change the network in Docker to have it ready for use. The Docker network allows container network interconnectivity, using your domain.

Checking the ENV File

The env file stores variables and contains declarations of these variables that will eventually be loaded on the container.

These files are very important for configuring the environment in Jitsi. In the env file, you can make as many configurations as you see fit. But, keep in mind that this setting is called in Docker-Compose to be applied to the container.

For example, there are many variables to configure, such as public url, port, ssl, jvb, Jibri, etc.

For this part of the tutorial, configure the env file to use recordings in Docker. Therefore, edit the env configuration in Docker Jitsi. To do so, you must enable Rest API on JVB.

# A comma separated list of APIs to enable when the JVB is started [default: none]
# See https://github.com/jitsi/jitsi-videobridge/blob/master/doc/rest.md for more information
JVB_ENABLE_APIS=rest,colibri

This API helps the recording run on Docker Jitsi. Moreover, you need to enable recordings in Jitsi. So, to enable recordings, remove the fence in front of the variable ENABLE_RECORDING=1

# Enable recording
ENABLE_RECORDING=1

Set ENABLE_RECORDING=1 for feature recording on Jitsi can be enabled on the server.

This will bring up the recording menu when the moderator starts the meeting. Don’t forget to edit the XMPP domain name if you are using a different docker network than the default!

# XMPP domain for the jibri recorder
XMPP_RECORDER_DOMAIN=recorder.meet.busanid.dev

# XMPP recorder user for Jibri client connections
JIBRI_RECORDER_USER=recorder

# Directory for recordings inside Jibri container
JIBRI_RECORDING_DIR=/config/recordings

# The finalizing script. Will run after recording is complete
JIBRI_FINALIZE_RECORDING_SCRIPT_PATH=/config/finalize.sh

# XMPP user for Jibri client connections
JIBRI_XMPP_USER=jibri

# MUC name for the Jibri pool
JIBRI_BREWERY_MUC=jibribrewery

# MUC connection timeout
JIBRI_PENDING_TIMEOUT=90

# When jibri gets a request to start a service for a room, the room
# jid will look like: [email protected]_domain
# We'll build the url for the call by transforming that into:
# https://xmpp_domain/subdomain/roomName
# So if there are any prefixes in the jid (like jitsi meet, which
# has its participants join a muc at conference.xmpp_domain) then
# list that prefix here so it can be stripped out to generate
# the call url correctly
JIBRI_STRIP_DOMAIN_JID=muc

That looks good, right? Congratulations! You have now successfully configured the env file. What does that mean? The recordings can be used now!

In addition, it’s time to build a Docker Jitsi container using this command:

docker compose up -d.

docker-compose -f docker-compose.yml -f jibri.yml up -d
docker compose up

Wait until the process of building the Jitsi container is complete; when finished, re-check all the services running on the container with this command:

docker compose ps

docker-compose -f docker-compose.yml -f jibri.yml ps
jibri docker compose ps

Since the Jibri container is running fine, let’s look at the logs on the container with the following command::

docker compose logs

docker compose logs jibri

All looks ready to proceed to the last and final step: Jtisi Recording.

Jitsi Recording of a Conference

You should try conferencing using the Jitsi server to ensure everything is in working order.

recording conference

Recording on Jitsi is running well on our end; we’re assuming it’s the same for you. If you face any errors, please drop them in the comment section below!

Accessing the Recording Files

To access the video files from recording., go to:

~/.jitsi-meet-cfg/jibri/recordings.

Alternatively, you can customize the location of video storage from config Jibri.

Jibri recording directory

If you followed the post ,your recording should be working well on the server. Else, let us know below what errors you might be facing so we can help you fix them. At this point, the moderators can start recordings when a conference begins.

Hope you liked this article and it was able to help you fix Jibri Docker “Recording Unavailable” error. Hit the like button if you learned something new and re-blog the post if your friends might find it useful.

Don’t forget to read more of our articles, such as How To Run Jitsi With Docker? and much more tech-savvy ones on topics like MySQL databases and Python Integration of CRUD operations, etc. Stay safe, stay healthy, and keep coming back to our blog for more amazing content in the future.

]]>
https://sesamedisk.com/fixing-recording-unavailable-on-jitsi-docker/feed/ 0
Difference between Agile and DevOps https://sesamedisk.com/difference-between-agile-and-devops-in-software-development/ https://sesamedisk.com/difference-between-agile-and-devops-in-software-development/#respond Sat, 29 May 2021 06:57:59 +0000 https://sesamedisk.com/?p=2341 DevOps is a hot topic that has been circulating in the industry for a long period. Despite its popularity, there is mounting concern about how it differs from Agile. What could be worse? The Agile and DevOps discussion is a never-ending one in the information technology industry.

Are you an ambitious engineer interested in learning all about DevOps and Agile?. If you want to learn how they differ and preferable, then stick around until the end of this ‘Agile vs. DevOps’ article, where I will share detailed information about both methodologies.

We will discuss the two methodologies in this article, as well as the differences between these two.

Agile Vs DevOps in Software Development
Agile Vs DevOps

What is Agile?

Agile is a project management style that emphasizes the continuous delivery of small, manageable project increments. It is done through iterative development and testing. It was created to replace the conventional waterfall technique, which is recognized for its organized, linear, and sequential life cycle.

Agile facilitates the day-to-day management of complex projects by enhancing communication and cooperation between team members and clients.

What is DevOps?

DevOps is a methodology of software development in which the development team collaborates with the operations team to increase cooperation and efficiency. Additionally, the process requires integrating DevOps ideas and strategies and testing using a set of DevOps tools.

Site Reliability Engineering is the next phase of DevOps implementation. DevOps is a concept that may be implemented in a variety of ways. SRE is much more rigid in terms of the way of doing things and what the team’s clear goals are; particularly, the objective is to maintain the site’s reliability and availability, and to prioritize the activities that contribute to achieve the goal.

The key aspect to remember is that DevOps is not a substitute for Agile! Does it sound incorrect? No, Agile is not on the verge of extinction. However, is DevOps superior? Yes, this is an advancement.

Agile vs. DevOps

Let’s begin by learning about the similarities and differences between the two methodologies. They are not the same, despite their similarities, and some may claim that one is better than other. Therefore, it is critical to know the exact details to clear this uncertainty.

How Agile and DevOps are similar?

How are both methodologies similar if they follow the different methods? Doesn’t it sound wrong? The answer is yes they have some similarities.

Both methodologies depend upon rapid software development. Moreover, their ideas support rapid growth without compromising the client or the processes.

Both emphasize efficiency, effectiveness, and quality across the software development lifecycle. Additionally, they prioritize shorter release cycles.

Both techniques place a greater emphasis on automation and cooperation. When you use Agile or DevOps methodologies, risk tends to decrease with time. On the other hand, risk tends to grow when other techniques, such as Waterfall, are used.

What are the differences between Agile and DevOps?

How Agile differ from DevOps? While both systems promote cooperation to increase speed and efficiency, they vary significantly regarding achieving the target. Before I talk about the technical differences, I want to set the context straight. Hence, I will be talking about a few technical differences which you should be aware of.  The following are some crucial differences in the Agile vs. DevOps debate.

Procedure

The difference between DevOps and Agile methodologies is how specific tasks are completed. Agile ensures regular communication between teams and clients while DevOps emphasizes testing and delivery. Communication between developers and IT operations is predominantly between programmers and IT operators. Additionally, the Agile approach is a better fit for complex projects, while the DevOps technique is more adapted for end-to-end procedures.

Teams 

The organizational structure of the teams is one of the major differences between DevOps and Agile. For instance, bigger teams often use DevOps, with the skill set shared across operations and development team members. It implies that each team member will be responsible for completing a particular job or task at each step of the process. On the other hand, agile is better suited for smaller teams that need to accomplish work quickly. Typically, the Agile methodology does not assign particular tasks to team members but instead encourages everyone to share responsibility equally. As a result, all Agile team members should be capable of managing or delegating any aspect of a project at any point in time.

Tools 

Agile and DevOps methodologies also use a variety of tools, depending on the nature of the project. Kanboard and Jira project management software and Bugzilla server software are popular Agile project management solutions. While DevOps utilizes Amazon Web Services cloud computing, Puppet automation software, TeamCity servers, OpenStack software, and Chef infrastructure.

Attention and Feedback

Agile and DevOps also have significant differences in terms of focus and feedback. While DevOps initiatives prioritize operational and business readiness and get feedback from internal team members, an Agile approach often receives input directly from customers.

In addition, agile teams often use sprints to keep focus, with each sprint lasting shorter than a month. Agile teams design sprints to ensure that available tasks are accomplished in manageable chunks, with the next sprint beginning just after the previous sprint is made.

With DevOps, specific deadlines and standards must be met, some of which might occur daily.

DevOpsAgile
Self EvaluationCustomer Feedback
Shorter release cycles, instant feedbackSmaller release cycles
Emphasis on efficiency and automationEmphasis on speed
Business-friendlyNot optimal for business

Conclusion

To conclude, both methodologies strive to provide high-quality software on schedule. The contrast between agile and DevOps is that agile emphasizes the optimization of the development lifecycle, while DevOps unifies development and operations in a continuous integration/continuous delivery environment.

Agile and DevOps do not have to be mutually independent. Any firm undergoing a DevOps transformation should not quit its current agile operations. DevOps is an extension of agile that focuses on techniques that are not central to agile. Hence, these methods enhance software development and result in higher-quality products.

]]>
https://sesamedisk.com/difference-between-agile-and-devops-in-software-development/feed/ 0