Docker

Docker becoming trend around this year and becoming standard on IT Industry for deployment of software applications.

I am also as developer but mostly on my previous job i couldnt learn this technology, because Sharepoint On-Premise currently not yet support on this Docker Environment.

After i joined this company Infinys System Indonesia https://infinyscloud.com/id, i have a lot learn about docker from team developer in here, because some deployment of our website it built on top of Docker.

The top reason enterprises are using Docker is to help them deploy across multiple systems, migrate applications, and remove manual reconfiguration work. Because application dependencies are built into containers, Docker containers significantly reduce interoperability concerns.

In this article, I’ll share what I have learned so far about docker.

  • What is docker?
  • Components of Docker
  • Comparison Virtual Machine vs Docker
  • When to use Container vs VMs
  • Basic Commands on Docker

A. What Is Docker

Docker delivers software in containers, which simplifies the process by packaging everything it takes to run an application.

There are numerous advantages to using containers to deploy applications.

  • Isolated — Applications have their own libraries; no conflicts will arise from different libraries in other applications.
  • Limited (limits on CPU/memory) — Applications may not hog resources from other applications.
  • Portable — The container contains everything it needs and is not tied to an OS or Cloud provider.
  • Lightweight — The kernel is shared, making it much smaller and faster than a full OS image.

B. Component Of Docker

  • Docker file is a text document that contains necessary commands which on execution helps assemble a Docker Image.
  • Docker Image it is a set of instructions which is used to build containers, consisting of application code with all the dependencies and libraries. It is portable so it can easily be shared between developers and operators.
  • Container is a way of packing application with all its dependencies and configuration files. A container is a running instance of our image.
  • Docker Engine supports the tasks and workflows involved to build, ship and run container-based applications. The engine creates a server-side daemon process that hosts images, containers, networks and storage volumes. Docker Engine is a client-server based application.
  • Docker CLI is a command line tool that lets you talk to the Docker daemon.

C. Comparision Virtual Machine vs Docker

Docker containers and virtual machines are both ways of deploying applications inside environments that are isolated from the underlying hardware. The chief difference is the level of isolation.

Link : https://www.weave.works/blog/a-practical-guide-to-choosing-between-docker-containers-and-vms

With a container runtime like Docker, your application is sandboxed inside of the isolation features that a container provides, but still shares the same kernel as other containers on the same host. As a result, processes running inside containers are visible from the host system (given enough privileges for listing all processes). For example, if you start a MongoDB container with Docker, then run ps -e | grep mongo in a regular shell on the host (not in Docker), the process will be visible. Having multiple containers share the same kernel allows the end user to bin-pack lots and lots of containers on the same machine with near-instant start time. Also, as a consequence of containers not needing to embed a full OS, they are very lightweight, commonly around 5-100 MB.

In contrast, with a virtual machine, everything running inside the VM is independent of the host operating system, or hypervisor. The virtual machine platform starts a process (called virtual machine monitor, or VMM) in order to manage the virtualization process for a specific VM, and the host system allocates some of its hardware resources to the VM. However, what’s fundamentally different with a VM is that at start time, it boots a new, dedicated kernel for this VM environment, and starts a (often rather large) set of operating system processes. This makes the size of the VM much larger than a typical container that only contains the application.

D. When to use Container vs VMs

Containers are a good choice for the majority of application workloads. Consider containers in particular if the following is a priority:

Start time
Docker containers typically start in a few seconds or less, whereas virtual machines can take minutes. Thus, workloads that need to start very quickly, or that involve spinning apps up and down constantly, may be a good fit for Docker.

Efficiency
Because Docker containers share many of their resources with the host system, they require fewer things to be installed in order to run. Compared to a virtual machine, a container typically takes up less space and consumes less RAM and CPU time. For this reason, you can often fit more applications on a single server using containers than you could by using virtual machines. Likewise, due to their lower levels of resource consumption, containers may help to save money on cloud computing costs.

Licensing
Most of the core technologies required to deploy Docker containers, including container runtimes and orchestrators like Kubernetes, are free and open source. This can lead to cost savings while also increasing flexibility. (But it’s worth noting that in many cases organizations will use a commercial distribution of Docker or Kubernetes in order to simplify deployment and obtain professional support services.)

Code reuse
Each running container is based on a container image, which contains the binaries and libraries that the container requires to run a given application. Container images are easy to build using Dockerfiles. They can be shared and reused using container registries, which are basically repositories that host container images. You can set up an internal registry to share and reuse containers within your company. Thousands of prebuilt images can be downloaded from public registries (e.g. Docker Hub or Quay.io) for free and used as the basis for building your own containerized applications.

Of course, VMs may be packaged into images, too, and those images can also be shared, but not as efficiently and easily as containers. Furthermore, virtual machine images aren’t as easy to automatically build, and are typically larger in size. Also, because they usually include operating systems, redistributing them can become legally complicated. (In most cases you can’t legally download and run a virtual machine image with Windows preinstalled without having a Windows license, for example.)

When to stick with virtual machines
Let’s look at some reasons why you might forgo Docker and stick with your virtual machines.

Security
A full discussion of the security merits of virtual machines as compared to Docker is beyond the scope of this article. But suffice it to say that, essentially, virtual machines are more isolated from each other and from the host system than are Docker containers. That is because virtual machines, as we’ve noted, don’t directly share any kernels or other resources with the host system.

For this reason, virtual machines are arguably more secure overall than containers. Although Docker provides various tools to help isolate containers and prevent a breach within one container from escalating into others, at the end of the day, containers aren’t isolated from a security perspective in the same way that virtual machines are.

E. Basic Commands on Docker

To get started using Docker, you have to download the Docker Application in this site https://www.docker.com/

Docker running smoothly on top OS Windows (Desktop / Server), Linux and also Mac OS.

After the installation Docker completed, it will appear UI like this below :

and you can as well using CLI to access the docker

For syntax and command on Docker, you can download this pdf file https://www.docker.com/sites/default/files/d8/2019-09/docker-cheat-sheet.pdf

  • docker pull pulls an image from registry to local machine.
  • docker images show images
  • docker run both creates and run a container in single operation
  • docker ps shows running containers
  • docker stop, stops a running container
  • docker ps -a shows running as well as stopped containers
  • docker start, starts a container to run it
  • etc

Happy Docker-ing

Come Now Is The Time To Worship

Come, now is the time to worship
Come, now is the time to give your heart
Come, just as you are to worship
Come, just as you are before your God
Come
One day every tongue will confess You are God
One day every knee will bow
Still the greatest treasure remains for those
Who gladly choose You now
Come, now is the time to worship
Come, now is the time to give your heart
Come, just as you are to worship
Come, just as you are before your God
Come
One day every tongue will confess You are God
One day every knee will bow
Still the greatest treasure remains for those
Who gladly choose You now
Willingly we choose to surrender our lives
Willingly our knees will bow
With all our heart, soul, mind and strength
We gladly choose You now
Come, now is the time to worship
Come, now is the time to give your heart
Come, just as you are to worship
Oh come, just as you are before your God
Come, come, come, oh come
Oh come, come
Bow, you nations
Come and worship
Come and worship your maker

Create first ASP.NET Core App in a Linux Docker Container

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.  (Wikipedia)

Docker itself now currently it is a trend for mostly application deployment. With Docker, we don’t have painfull when to deploy to other environment. Because we just publish our docker with all the configuration that we already setup it before and re-use again when want to deploy it to other machine. With minor of configuration as well (Easy to distribute)

Here as below the my sample application using asp.net core and publish it to docker :

  1. Create new project. Choose the ASP.Net Core web app like on screenshot below

2. Test run the web apps

Yeayy! now you already done to create one asp.net core application 🙂

3. Add Docker support.

To download docker for windows you can go to this link https://www.docker.com/products/docker-desktop. Download and install it.

Dockerfile is a text based file (but having no extension). It contains instructions telling how to assemble a docker image. In Visual Studio you can create Dockerfile effortlessly by right clicking the app name in the solution explorer then select Add ➤Docker Support.

For this project, i choose target os is Linux

5. ASP.NET Core Dockerfile structure

6. Build the Project and Docker will listed on the docker UI.

7. Run the application and choose Docker as environment

Once it is already deployed, you can check all the pages that already deploy it with bash.

8. Push to Hub

Let say we already did all the progamming and setup on this docker. We can push it to the hub, then we can deploy it to other machine which already had also the docker.

Happy Coding

Enable snaps on Linux Mint and install Mysql Workbench Community

Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.

Enable snapd

Snap is available for Linux Mint 18.2 (Sonya), Linux Mint 18.3 (Sylvia), Linux Mint 19 (Tara), Linux Mint 19.1 (Tessa) and the latest release, Linux Mint 20 (Ulyana). You can find out which version of Linux Mint you’re running by opening System info from the Preferences menu.

On Linux Mint 20, /etc/apt/preferences.d/nosnap.pref needs to be removed before Snap can be installed. This can be accomplished from the command line:

sudo rm /etc/apt/preferences.d/nosnap.pref
sudo apt update

sudo apt update
sudo apt install snapd

Either restart your machine, or log out and in again, to complete the installation

Install Mysql Workbench Community

To install just follow this command as below :

sudo snap install mysql-workbench-community

Configure User Profile Service Application and My Site in SharePoint 2019

A. Create User Profile Sync for Active Directory for User AD Syncronization

Example the user account is spSyncConn

  1. Create a user on your Active Directory for User AD Syncronication, let say spSyncConn
  2. The synchronization account must have Replicate Directory Changes permissions at the root of the forest.

B. Configure Synchronization Connections

  • Open Central Admin
  • Click Application Management
  • Navigate to Manage Service Application >> User Profile Service Application
  • Uder Synchronization >> click Configure Synchronization Connection
  • On the Synchronization Connection page >> click on Create New connection

Fill the fields with your environment and/or business needs

  • Click button Populate Container to List all the structure of yor active directory
  • Checked all those that you want to sync it or click all to syncronize all
  • Then Click button OK to save the configuration

C. Create MySite Host

  • Open Central Adminstration
  • Click Create site Collection
  • Fill in up all the information and choose My Site Host as template

  • Fill in the Primary Site Collection Administrator and Secondary as well
  • Choose quota template
  • Click button OK to save the configuration

D. Create My Site Managed Path

We will need to create a Managed Path for the My Site. Let’s use the path “/sites/MySite/Personal” for this purpose. If it is not created already, we can create it going to the Central Administration ->Manage Web Applications -> Managed Paths

In the new Managed Path creation page, add the intended Managed path(“/sites/MySite/Personal”). Specify the type as Wildcard Inclusion and click on OK.

D. Configure My Site

  •  User Profile Service Application from Application Management -> Manage Service Applications .
  • It will open up the User Profile Service Application page. From there, select ‘Setup My Sites’.
  • In the My Site Host section, specify the Site Collection URL for the My Site Host we had created earlier.
  • Under Personal Site Location, specify the Managed Path for the My Site that we had created earlier.

E. Configure Self Service Site Creation

So, one added benefit of My Site is that it enables users to create Site Collections from the My Site Page. We can enable it from Manage Web Applications -> Self Service Site Creation.

Done.

Happy Sharepoint-ing

Benefits Of Cloud Computing

You’re probably using cloud computing services right now, even if you don’t realize it. If you use an online service to send email, edit documents, watch movies or TV, listen to music, play games, or store pictures and other files, it’s likely that cloud computing is making it all possible behind the scenes.

Cloud computing is a significant shift from the traditional way businesses think about information technology (IT) resources.

Following are some reasons why you should turn to cloud computing services:

  • Cost
  • Global
  • Performance
  • Security
  • Scalable, elastic, and flexible
  • Productivity
  • Reliability

Cost

Cloud computing eliminates the capital expense of buying hardware and software. You no longer need to set up and run on-site datacenters with racks of servers. You no longer need round-the-clock electricity for power and cooling, or the IT experts for managing the infrastructure. The cost adds up fast.

This consumption-based model brings with it many benefits, including:

  • No upfront infrastructure costs.
  • No need to purchase, manage, and maintain costly infrastructure that you may not use to its fullest.
  • Pay for additional resources only when they’re needed.
  • Stop paying for resources that are no longer needed.

Global

The benefits of cloud computing services include the ability to scale elastically. In cloud terms, that means delivering the right amount of IT resources—more or less computing power, storage, or bandwidth—right when they’re needed, and from the right geographic location.

Performance

The biggest cloud computing services run on a worldwide network of secure datacenters. The providers regularly upgrade to the latest generation of fast and efficient computing hardware. This configuration offers several benefits over a single corporate datacenter, including reduced network latency for applications and greater economies of scale.

Security

Many cloud providers offer a broad set of policies, technologies, and controls that strengthen your security posture overall. They protect your data, apps, and infrastructure from potential threats.

You have physical security—who can access the building, who can operate the server racks, and so on. You also have digital security—who can connect to your systems and data over the network.

Scalable, elastic, and flexible

Cloud providers offer cloud computing services self-service and on demand. You can provision vast amounts of computing resources in minutes, typically with just a few mouse clicks. Cloud computing gives your business flexibility and takes the pressure off capacity planning.

Cloud computing supports both vertical and horizontal scaling, depending on your needs:

  • Vertical scaling, also known as scaling up, is the process of adding resources to increase the power of an existing server. Some examples of vertical scaling include adding more CPUs and adding more memory to support increased data collection.
  • Horizontal scaling, also known as scaling out, is the process of adding more servers that function together as one unit. For example, you have more than one server processing incoming requests.

Scaling can be done manually or automatically based on specific triggers, such as CPU use or the number of requests and resources that can be allocated or de-allocated in minutes.

Productivity

On-site datacenters often require a racking and stacking hardware setup, software patching, and other time-consuming IT management chores. Cloud computing removes the need for many of these tasks. Your IT teams can spend time on achieving more important business goals.

Reliability

Cloud computing makes data backup, disaster recovery, and business continuity easier and less expensive because data can be mirrored at multiple redundant sites on the cloud provider’s network.

Source :

https://docs.microsoft.com/en-us/learn/modules/principles-cloud-computing-dynamics-365-deployment/4-benefits-cloud-computing

How to make Absence Attendance mobile apps with feature GPS location in 2 days – Power Apps

There are 2 version languages available for this article.

Indonesia Version :

Ignite 2021 ini, saya tertarik dengan salah satu presentasi dan demo mengenai Power Apps.

Demo dari perusahaan itu dan ide mereka dimana membuat aplikasi-aplikasi kecil dalam membantu digitilasi dan automisasi perusahaan. Pada saat itu mereka juga menjelaskan berapa antusiasnya para user-user mereka menggunakan aplikasi itu dan mulai mengembangkan aplikasi-aplikasi lainnya untuk kebutuhan lainnya.

Dari situ saya berpikir, wah saya juga ingin mencoba membuatnya dan berpikir bahwa aplikasi yang cepat siap saji, cepat dalam development dan implementasi itu akan mempercepat produktifitas perusahaan itu sendiri.

Kebetulan saya juga akan membawakan webinar untuk tanggal 25 Maret 2021 mengenai “Leverage your Work from Home Level Now” maka mencoba membuatkan aplikasi menggunakan Power Apps tersebut, dengan data berita perusahan saya ambil dari internal Sharepoint Online dan penyimpanan data absen itu menggunakan excel file yang di taruh di onedrive microsoft office 365.

Berikut requirementnya:

Sebagai HRD dan Company

  • Applikasi yang mudah dibuat, tidak perlu ribet development dan implementasi
  • Dapat dengan mudah melakukan rekap Absen karena menggunakan Excel File
  • Bisa sharing kegiatan-kegiatan perusahan yang bisa dibaca oleh Karyawan
  • Aman, hanya bisa diakses oleh karyawan
  • Dapat memberikan Posisi (GPS) dimana karyawan berada. Itu dapat membantu bila ada informasi terkait Covid 19 di wilayah tersebut

Sebagi User / Employee

  • Dapat diakses mudah dan aman
  • UI yang simple dan informatif
  • Karyawan bisa mudah melihat history absen yang sudah di submit.
  • Karyawan bisa mengetahui berita seputar perusahaan.

Okay 🙂 Setelah requirement diatas maka mari kita persiapkan dan buat aplikasinya :

  1. Siapkan data source Events untuk berita-berita perusahan. Disini kita cukup menggunakan list dengan tipe calendar

2. Siapkan data source Excel, yang nantinya data absen akan disimpan kesana

Sheet1

Sheet 2, master data pada drop down menu nantinya.

3. Mari buat dengan Power Apps setelah point 1 dan 2 diatas sudah kita siapkan

Total screen yang akan kita buat adalah 6 (enam), yaitu :

  • Home Screen

Submit Attendance Click ini akan Navigate(EditAttendanceScreen,ScreenTransition.None)

My Attendance List ini akan Navigate(MyAttendanceScreen, ScreenTransition.Fade)

Company News ini akan Navigate(NewsListScreen, ScreenTransition.Fade)

  • NewsListScreen

  • MyAttendanceScreen
  • DetailAttendanceScreen
  • EditAttendanceScreen

Power Apps form sudah selesai, maka siap di publish dan share ke user-user yang di organisasi anda yang akan menggunakan aplikasi ini.

—————————————

English Version :

Past month ago, there was a Microsoft Event Ignite 2021. I was interested with one presentation and demo about the Power Apps.

That demo was about from one of company at Indonesia. They are have briliant idea to build small and simple application – application for their company to help the compay on digitalisation and automitation process. At that presentation, the speaker was also explained how enthusiastic their employee to use the application and began to develop other applications for other needed.

After that presentation i was thought, wow i am also want to try to build the application like that. The application with fast to serve, fast in to development and also implementation it will accelarate the productivity of the company itself.

25 March 2021, i am also have a webinar with title “Leverage your Work from Home Level Now” and i am also as speaker there. For that event, i tried to make an application on top Power Apps. With company news data that I take from internal Sharepoint Online and store the absent data using excel file that is placed on OneDrive Microsoft Office 365.

Here are the requirement detail as follow :

As Human Resources Department and Company

  • The application has to be simple. Easy to development and Implementation
  • Easy to do absense recap, because it using Excel Files.
  • Able to share company events to employee
  • Safe and Secure and only able to access by its employee.
  • Can provide Position (GPS) where employees are located. That can help if there is information related to Covid 19 in the area

As Employee

  • Application it is easy to used and secure
  • User Interface simpel and informatif
  • Employee with ease to see their absence history was submitted
  • Employee can read information about event around company.

Okay 🙂 Regarding the requirement above then we can prepare and start to build the application :

  1. Prepare the Events data source for company news. Here we just need to use a list with a calendar type

2. Prepare the Excel data source, which later the timesheet will be saved there

Sheet 1

Sheet 2

3. Let’s cook it after point 1 and 2 above we have prepared

The total screen that we will create is 6 (six), namely:

  • EditAttendanceScreen

All complete, so it’s ready to publish and share with users in your organization who will use this application.

Happy Sharepoint-ing

MySQL InnoDB Cluster on Ubuntu 20.04 – Infinys Cloud

A few weeks ago, there was request from the our client for about how to implement MySQL InnoDB Cluster on their Virtual Machines at our cloud server Infinys Cloud. For fulfill that POC (purpose of concept), we are prepare some server and the step installation like as below :

ServerIPSoftwareRole
APP Server + MySQL Router117.xxx.xxx.1MySQL RouterClient / APP Server
MYSQL-CL-01117.xxx.xxx.2MySQL Server, MySQL ShellPrimary/Master DB Server
MySQL-CL-02117.xxx.xxx.3MySQL Server, MySQL ShellRead Only DB Server 1
MySQL-CL-03117.xxx.xxx.4MySQL Server, MySQL ShellRead Only DB Server 2

A. Setting up MySQL Innodb Cluster

The Innodb Cluster settings below are carried out on 3 machines, namely MYSQL-CL-01, MySQL-CL-02, and MySQL-CL-03

The steps are as follows:

  1. Update Host
  • Run sudo nano /etc/hosts

Register MYSQL-CL-01, MySQL-CL-02, and MySQL-CL-03 with the IP that has been registered above. For example one of the computer names uses the IP 127.0.0.1 then it must be replaced with the IP of the server instead of 127.0.0.1

2. Install MySQL Server Engine

  • Run sudo apt update
  • Run sudo apt-get install mysql-server
  • sudo systemctl status mysql.
  • Run sudo mysql_secure_installation . Run this and follow all the steps.

After all the steps are done, it means that the MySQL Server installation stage is complete.

3. Create User untuk dipakai di Replikasi System

  • Run, sudo mysql -u root p
  • Execute Query : Select user,host.plugin from mysql.user;
mysql> Select user, host, plugin 
user 
debi an— sys —maint 
mysql . infoschema 
from mysql . user; 
mysql . session 
host 
local host 
local host 
local host 
local host 
local host 
plugin 
caching 
caching 
caching 
caching 
sha2 
sha2 
sha2 
sha2 
password 
password 
password 
pa s s word 
mysql . sys 
100 t 
rows in sec 
auth socket 
(0.00 sec)
  • CREATE USER ‘usr_replication’@’%’ IDENTIFIED WITH mysql_native_password BY ‘XXXXXXX’;

XXXXXXX = Password.

  • GRANT ALL PRIVILEGES ON *.* To ‘usr_replication’ with GRANT OPTION;
  • Flush Privilges;
  • Execute Query : Select user,host.plugin from mysql.user;

4. Install MySQL Shell

  • Run sudo apt-install snapd
  • Run snap install mysql-shell
  • Run sudo apt-get update

B. Configure Group Replication

  1. Create Instance MYSQL-CL-01
  • Login to server MYSQL-CL-01
  • Run mysqlsh MYSQL-CL-01 -u – usr_replication and type the password
  • Run Dba.help (); To see all commands that provided.
ACC IibuCeEIIOI: unkncwn attribute: 
dba . help ( ) 
che ckIns C anceConfi guy a C i on 
dba 
InnoDB cluster and 
repli caseC management functions . 
DESCRIPTION 
Entry point for AdminAPI 
sets. 
InnoDB clusters 
fun cc ions , 
including InnoDB clusters 
and 
repl i ca 
The dba. configure instance function can be used Co configure a MySQL 
instance with the settings required Co use iC in an InnoDB cluster. 
InnoDB clusters can be created with Che 
Once created, InnoDB cluster management 
dba. get cluster() function. 
InnoDB Repli case Cs 
dba. create cluster() function. 
objects can be obtained with Che 
The dba. configure replica sec instance function can be used Co 
configure a MySQL instance with the 
replicaset . 
ReplicaSeCs can be created with Che 
Once created, repli caseC management 
settings required Co use iC in a 
dba. create replica sec() function. 
objects can be obtained with Che 
dba. get replica set O 
S andboxe s 
Utility functions are 
can be used to create 
PROPERTIES 
verb3se 
function . 
provided Co create sandb3X MySQL 
Cest clusters and replicasets . 
instances , 
whi ch 
Cont s debug me s sage 
operations . 
FUNCTIONS 
ve rbos i C y 
for 
s andbox 
re laced dba 
check instance configuration (instance [ , 
options ) 
Validates an instance for MySQL InnoDB Cluster usage . 
configure instance ( [instance] [ , options] ) 
Validates 
usage . 
configure local 
Validates 
usage . 
and configures an instance for MySQL InnoDB Cluster 
instance (instance [ , options] ) 
and configures a local instance for MySQL 
options ) 
for use in an 
InnoDB Cluster 
InnoDB 
configure replica sec instance ( [instance] [ , 
Validates and configures an instance 
ReplicaSet . 
create cluster (name [ , options] ) 
Creates a MySQL InnoDB cluster .
  • Run, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.2’) and type the password
  • Instance server MYSQL-CL-01 completed.

2. Create Instance MYSQL-CL-02

  • Login ke server MYSQL-CL-02
  • Run mysqlsh -u – usr_replication and type in the password.
  • run, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.3’) type in the password
  • Instance server MYSQL-CL-02 completed.

3. Create Instance MYSQL-CL-03

  • Login ke server MYSQL-CL-03
  • Run mysqlsh -u – usr_replication and type in the password.
  • run, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.4’) type in the password
  • Instance server MYSQL-CL-02 completed.

4.Create New Cluster and Register Instance to that new Cluster

  • Login ke server MYSQL-CL-01
  • run mysqlsh -u – usr_replication dan masukkan password
  • Run this to create New Cluster : cluster=dba.createCluster(‘clusterName’) ->In this test i use the name ProdCluster
  • cluster.addInstance(‘usr_replication@@117.xxx.xxx.3’)
  • cluster.addInstance(‘usr_replication@@117.xxx.xxx.4’)
  • After all servers have been registered into the cluster, we can find out their status by running dba.status ();

C. Install MySQL Router

MySQL Router recommend to be installed on same server with the application used. So it means that MySQL Router can be installed on more than one server.

  1. MySQL Router Install
  • Run, sudo apt-get mysql-router
  • Run, mysqlrouter –user root –bootstrap usr_replication@MYSQL-CL-01  –directory /tmp/myrouter

2.Verifiying the MySQL Router Works

  • Run mysql -uroot -p -P 6446
  • If you can connect to the database, it means that our MySQL Router installation has been successful


Indonesia Version

Beberapa minggu yang lalu, ada permintaan dari klien kami tentang cara mengimplementasikan MySQL InnoDB Cluster pada Mesin Virtual mereka di server cloud kami Infinys Cloud. Untuk memenuhi POC (tujuan konsep) tersebut, kami menyiapkan beberapa server seperti pada tabel di bawah ini:

ServerIPSoftwareRole
APP Server + MySQL Router117.xxx.xxx.1MySQL RouterClient / APP Server
MYSQL-CL-01117.xxx.xxx.2MySQL Server, MySQL ShellPrimary/Master DB Server
MySQL-CL-02117.xxx.xxx.3MySQL Server, MySQL ShellRead Only DB Server 1
MySQL-CL-03117.xxx.xxx.4MySQL Server, MySQL ShellRead Only DB Server 2

A. Setting up MySQL Innodb Cluster

Setting Innodb Cluster dibawah ini, dilakukan di 3 mesin yaitu MYSQL-CL-01, MySQL-CL-02, dan MySQL-CL-03

Langkah-langkah sebagai berikut :

  1. Update Host
  • Jalankan sudo nano /etc/hosts

Daftarkan MYSQL-CL-01, MySQL-CL-02, dan MySQL-CL-03 dengan IP yang sudah di daftarkan diatas. Bila misalnya salah satu nama komputer itu menggunakan IP 127.0.0.1 maka harus di ganti dengan IP dari server tersebut bukan 127.0.0.1

2. Install MySQL Server Engine

  • Jalankan sudo apt update
  • Jalankan sudo apt-get install mysql-server
  • sudo systemctl status mysql. Untuk mengetahui bahwa installasi sudah berhasil dan mysql harus dalam keadaan active (running)
  • Jalankan sudo mysql_secure_installation . Untuk setup root dan beberapa permission MySQL server lainnya.

Setelah semua langkah dilakukan, artinya tahapan Instalasi MySQL Server sudah selesai.

3. Create User untuk dipakai di Replikasi System

  • Jalankan, sudo mysql -u root p
  • Eksekusi Query : Select user,host.plugin from mysql.user;
mysql> Select user, host, plugin 
user 
debi an— sys —maint 
mysql . infoschema 
from mysql . user; 
mysql . session 
host 
local host 
local host 
local host 
local host 
local host 
plugin 
caching 
caching 
caching 
caching 
sha2 
sha2 
sha2 
sha2 
password 
password 
password 
pa s s word 
mysql . sys 
100 t 
rows in sec 
auth socket 
(0.00 sec)
  • CREATE USER ‘usr_replication’@’%’ IDENTIFIED WITH mysql_native_password BY ‘XXXXXXX’;

XXXXXXX = Password.

  • GRANT ALL PRIVILEGES ON *.* To ‘usr_replication’ with GRANT OPTION;
  • Flush Privilges;
  • Eksekusi Query : Select user,host.plugin from mysql.user;

4. Install MySQL Shell

  • Jalankan sudo apt-install snapd
  • snap install mysql-shell
  • sudo apt-get update

B. Configure Group Replication

  1. Create Instance MYSQL-CL-01
  • Login ke server MYSQL-CL-01
  • Jalankan mysqlsh MYSQL-CL-01 -u – usr_replication dan masukkan password
  • Jalankan Dba.help (); Untuk melihat perintah apa yang bisa kita lakukan.
ACC IibuCeEIIOI: unkncwn attribute: 
dba . help ( ) 
che ckIns C anceConfi guy a C i on 
dba 
InnoDB cluster and 
repli caseC management functions . 
DESCRIPTION 
Entry point for AdminAPI 
sets. 
InnoDB clusters 
fun cc ions , 
including InnoDB clusters 
and 
repl i ca 
The dba. configure instance function can be used Co configure a MySQL 
instance with the settings required Co use iC in an InnoDB cluster. 
InnoDB clusters can be created with Che 
Once created, InnoDB cluster management 
dba. get cluster() function. 
InnoDB Repli case Cs 
dba. create cluster() function. 
objects can be obtained with Che 
The dba. configure replica sec instance function can be used Co 
configure a MySQL instance with the 
replicaset . 
ReplicaSeCs can be created with Che 
Once created, repli caseC management 
settings required Co use iC in a 
dba. create replica sec() function. 
objects can be obtained with Che 
dba. get replica set O 
S andboxe s 
Utility functions are 
can be used to create 
PROPERTIES 
verb3se 
function . 
provided Co create sandb3X MySQL 
Cest clusters and replicasets . 
instances , 
whi ch 
Cont s debug me s sage 
operations . 
FUNCTIONS 
ve rbos i C y 
for 
s andbox 
re laced dba 
check instance configuration (instance [ , 
options ) 
Validates an instance for MySQL InnoDB Cluster usage . 
configure instance ( [instance] [ , options] ) 
Validates 
usage . 
configure local 
Validates 
usage . 
and configures an instance for MySQL InnoDB Cluster 
instance (instance [ , options] ) 
and configures a local instance for MySQL 
options ) 
for use in an 
InnoDB Cluster 
InnoDB 
configure replica sec instance ( [instance] [ , 
Validates and configures an instance 
ReplicaSet . 
create cluster (name [ , options] ) 
Creates a MySQL InnoDB cluster .
  • Jalankan, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.2’) dan masukkan password
  • Instance server MYSQL-CL-01 selesai.

2. Create Instance MYSQL-CL-02

  • Login ke server MYSQL-CL-02
  • Jalankan mysqlsh -u – usr_replication dan masukkan password
  • Jalankan, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.3’) dan masukkan password
  • Instance server MYSQL-CL-02 selesai.

3. Create Instance MYSQL-CL-03

  • Login ke server MYSQL-CL-03
  • Jalankan mysqlsh -u – usr_replication dan masukkan password
  • Jalankan, dba.configure_local_instance(‘usr_replication@117.xxx.xxx.4’) dan masukkan password
  • Instance server MYSQL-CL-03 selesai.

4.Create New Cluster and Register Instance to that new Cluster

  • Login ke server MYSQL-CL-01
  • Jalankan mysqlsh MYSQL-CL-01 -u – usr_replication dan masukkan password
  • Jalankan cluster=dba.createCluster(‘clusterName’) -> didalam test ini saya menggunakan nama ProdCluster
  • cluster.addInstance(‘usr_replication@@117.xxx.xxx.3’)
  • cluster.addInstance(‘usr_replication@@117.xxx.xxx.4’)
  • Setelah semua server sudah di daftarkan kedalam Cluster tersebut, maka kita bisa mengetahu statusnya dengan menjalankan dba.status();

C. Install MySQL Router

MySQL Router sebaiknya di install satu server dengan aplikasi yang digunakan. Jadi MySQL Router bisa diinstall lebih dari satu server.

  1. MySQL Router Install
  • Jalankan , sudo apt-get mysql-router
  • Jalankan, mysqlrouter –user root –bootstrap usr_replication@MYSQL-CL-01  –directory /tmp/myrouter

2.Verifiying the MySQL Router Works

  • Login dengan mysql -uroot -p -P 6446
  • Bila bisa connect artinya instalasi MySQL Router sudah berhasil/.

Other References :

The Lord’s Prayer

Father in Heaven
Holy is Your Name
Your kingdom come
Your will be done on earth
As it is in Heaven
Our Father in Heaven
Lead us not into temptation
God deliver us from the enemyYours is the kingdom
And the power
And the glory
ForeverGive us each moment
All that we need
Forgive us our sins
As we forgive the ones
Who have sinned against us
Our Father in HeavenLead us not into temptation
God deliver us from the enemyYours is the kingdom
And the power
And the glory
ForeverYours is the kingdom
And the power
And the glory
ForeverOur Father have Your way
On the earth
Your will be doneOur Father have Your way
On the earth
Your will be doneOur Father have Your way
On the earth
Your will be doneOur Father have Your way
On the earth
Your will be doneYours is the kingdom
And the power
And the glory
ForeverYours is the kingdom
And the power
And the glory
ForeverYours is the kingdom
And the power
And the glory
ForeverYours is the kingdom
And the power
And the glory
ForeverYours is the kingdom
And the power
And the glory
Forever
And ever more
Amen

By Hilsong

Setup Power Apps Integration with Sharepoint Server On-Premise (Infopath replacement)

InfoPath as we know it will no longer be used in next version of Sharepoint Server. In fact, since several years ago, Microsoft has announced this. But until now in version of Sharepoint 2019, Infopath service is still remain but with no longer any improvement features at all in Infopath.

Infopath itself is one of the best tools from Microsoft Sharepoint that has long been used by Sharepoint Developers to be able to make applications easier, faster and very user friendly in an interface.

Now Microsoft offers a new Technology that is Power Apps. Similar with Infopath, Power Apps also help users to design their application easily, quickly and user friendly. But it is not limited to Sharepoint or SQL Server data sources only, but can access other data sources as well like One Drive, Google Drive, Drop Box, and many more

Power Apps is a Cloud Centrix Application, where the application is in Microsoft Cloud, and until this article was published Power Apps cannot be installed on On Premises Environment.

Powers Apps can also intergrated with our Microsoft Sharepoint On Premises atau SQL Server On Premises.

Here are the steps for integrating Microsoft Sharepoint 2019 On Premise with Power Apps.

  1. Register an Power Apps account at https://make.powerapps.com
  2. Download Power Apps Studio and Power Apps On-Premises Data gateway
This image has an empty alt attribute; its file name is image-4.png

3. Install On-Premises Data Gateway on our Server Sharepoint 2019 On Premise

The steps are as follows:

  • Type your email addrress that you was registered at Power Apps portal.
  • Register a new gateway on this computer
  • Type Gateway Name, and Recovery Key
  • The gateway result configration we can see on Power Apps Portal.

3. Create a new SharePoint Connector and Connect to Gateway that we have been created.

  • Choose Connect Using on-premises data gateway dan type Username and Password is needed,
x 
SharePoint 
Microsoft 
SharePoint helps organizations share and collaborate with colleagues, partners, 
and customers. You can connect to SharePoint Online or to an on-premises 
SharePoint 2013 or 2016 farm using the On-Premises Data Gateway to manage 
documents and list items. 
How do you want to connect to your data? 
C) Connect directly (cloud-services) 
@Connect using on-premises data gateway O 
Authentication Type 
Windows 
Username 
Cancel 
Create
SharePoint 
Microsoft 
Windows 
Username 
Password * 
Choose a gateway 
Agusto 
If you don't see a gateway, or want a new one, you can install one 
*hic lic. 
Cancel 
x 
CD

4. Installation are done!!! 🙂 yippe. Now we able to use it on Power Apps to create our application

In Indonesia Version

InfoPath seperti yang kita ketahui tidak akan digunakan lagi di versi Sharepoint Server berikutnya.

Padahal, sejak beberapa tahun lalu, Microsoft sudah menyinggung hal ini. Namun hingga saat ini di versi Sharepoint 2019, layanan Infopath masih tetap ada namun tidak ada lagi peningkatan/pembaharuan fitur sama sekali di Infopath.

Infopath itu sendiri adalah salah satu tools terbaik dari Microsoft Sharepoint yang sudah lama dipakai oleh para Developer Sharepoint untuk bisa membuat aplikasi lebih mudah, cepat dan sangat user friendly secara interface.

Sekarang Microsoft menawarkan technology baru yaitu Power Apps. Sama dengan Infopath, Power Apps juga membantu user untuk mendesign aplikasi mereka dengan mudah, cepat dan user friendly. Tetapi tidak dibatasi hanya dengan data sources Sharepoint atau SQL Server saja, tetapi bisa mengakses datasource lainnya seperti One Drive, Google Drive, Drop Box, dll.

Power Apps ini juga adalah bagian dari Power Platform yang pernah saya jelaskan di article saya sebelumnya https://agustox21.wordpress.com/2021/01/20/microsoft-power-platform

Power Apps ini adalah aplikasi Cloud Centrix, dimana aplikasi ada di Microsoft Cloud dan sampai saat artikel ini dibuat Power Apps tidak bisa diinstall di On Premise Environment.

Power Apps juga bisa diintergrasikan dengan Microsoft Sharepoint 2019 On Premise atau SQL Server On Premise kita.

Berikut adalah langkah-langkah mengintergrasikan Microsoft Sharepoint 2019 On Premise dengan Power Apps.

  1. Membuat Akun Power Apps di https://make.powerapps.com/
  2. Download Power Apps Studio dan Power Apps On-Premises Data gateway

3. Install On-Premises Data Gateway di Server Mesin Sharepoint 2019 On Premise

Langkah-langkah sebagai berikut :

  • Masukkan alamat email Akun Power Apps / Azure yang ada
  • Register a new gateway on this computer
  • Masukkan Gateway Name, dan Key
  • Hasil gateway tersebut bisa kita lihat di Power Apps Portal

3. Buat Connector SharePoint dan Connect ke Gateway yang sudah kita buat

  • Plih Connect Using on-premises data gateway dan masukkan Username dan Password yang dibutuhkan
x 
SharePoint 
Microsoft 
SharePoint helps organizations share and collaborate with colleagues, partners, 
and customers. You can connect to SharePoint Online or to an on-premises 
SharePoint 2013 or 2016 farm using the On-Premises Data Gateway to manage 
documents and list items. 
How do you want to connect to your data? 
C) Connect directly (cloud-services) 
@Connect using on-premises data gateway O 
Authentication Type 
Windows 
Username 
Cancel 
Create
SharePoint 
Microsoft 
Windows 
Username 
Password * 
Choose a gateway 
Agusto 
If you don't see a gateway, or want a new one, you can install one 
*hic lic. 
Cancel 
x 
CD

4. Installasi sudah selesai dan kita sudah bisa menggunkan Power Apps untuk aplikasi yang kita inginkan.

Happy Sharepoint-Ing