Install GitHub Desktop in Ubuntu

>sudo wget https://github.com/shiftkey/desktop/releases/download/release-2.9.3-linux3/GitHubDesktop-linux-2.9.3-linux3.deb

>sudo apt install gdebi

>sudo gdebi GitHubDesktop-linux-2.9.3-linux3.deb

Reference: https://gist.github.com/berkorbay/6feda478a00b0432d13f1fc0a50467f1

Money Lending in USA

Equifax Company – Know your Customer –
http://dataxltd.com/services/know-your-customer/

Factor Trust for Credit Risk Assessment
https://www.transunion.com/client-support/factortrust-consumer-inquiry

Clarity
https://www.clarityservices.com/solutions/credit/clear-credit-risk/

Ubuntu Scanner

>sudo apt update

>sudo apt install simple-scan

>scanimage -L

>sudo simple-scan

Ubuntu – Error Mounting drive

Error mounting /dev/sdb2 at /media/ubuntu/

>sudo fdisk -l
>sudo ntfsfix /dev/sdb2

Deploy Springboot into Kubernetes

We can’t start minikube with root user

su – developer

minikube start

minikube dashboard

Open the URL in browser

Check cubectl version

kubectl version –client

kubectl create deployment spring-docker-jre11-demo –image=polimetla/demoweb:spring-docker-jre11-demo

kubectl expose deployment spring-docker-jre11-demo –type=NodePort –port=8080

kubectl get services spring-docker-jre11-demo

minikube service spring-docker-jre11-demo

Open the URL in browser

Springboot with Docker


Step 1: Build Spring Boot web application
## Download Spring Boot project from
https://start.spring.io/


## Add controller class and web dependency
Reference: https://spring.io/guides/gs/rest-service/

>mvn clean install
>java -jar target/spring-docker-1.0.jar

In Browser
http://localhost:8080/greeting?name=paul
http://localhost:8080/greeting

Step 2: Build Docker image and Running as Docker container 

Image reference
https://hub.docker.com/_/openjdk?tab=tags&page=1&ordering=last_updated

## Add “Dockerfile” at root level. Content

FROM openjdk:11.0.7-jre-slim
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT [“java”,”-jar”,”/app.jar”]

Commands reference
https://spring.io/guides/gs/spring-boot-docker/

Docker reference
https://docs.docker.com/engine/reference/commandline/build/

Image name: spring-docker-demo

>sudo docker build -t spring-docker-demo .

>sudo docker run -p 8080:8080 spring-docker-demo

>sudo docker ps

Stop the image with id
>sudo docker stop 16114e57a7f6


Use this to see running processes
>sudo docker ps

See the docker containers
>sudo ls -al /var/lib/docker/containers

Step 3: Building and  pushing to Docker Repo

Login with https://hub.docker.com/?ref=login credentials
>sudo docker login

>sudo docker rmi imagename or id


!!!! This is important – change local repo name to new as follows

Tag with repo name

>sudo docker tag spring-docker-demo:latest polimetla/demoweb:spring-docker-jre11-demo

>sudo docker push polimetla/demoweb:spring-docker-jre11-demo

>sudo docker pull polimetla/demoweb:spring-docker-jre11-demo

Run the docker image

>sudo docker run -p 8080:8080 polimetla/demoweb:spring-docker-jre11-demo

Check http://localhost:8080/

Stop the running image

>sudo docker ps

See the container id and pass it to the next command

>sudo docker stop container_id

Docker commands reference

https://docs.docker.com/engine/reference/run/

-End-

Image name: polimetla/demoweb:spring-docker-jre11-demo

Technology catalog

https://digital.ai/periodic-table-of-devops-tools

Styling with ReactJS

https://material-ui.com/customization/components/
https://material-ui.com/customization/components/#global-css-override
This is the best way

Other references
https://stackoverflow.com/questions/59670374/how-to-use-global-with-react-jss

withStyles Vs makeStyles
https://stackoverflow.com/questions/57697664/what-is-the-benefit-of-using-withstyles-over-makestyles

-o-
Custom components

How to secure Spring Boot with SSL Certificate?

First, make sure that the application is up and running in DigitalOcean
Step 0: Application is available on http://1.2.3.4:8080
Spring Boot application deployed and running. Accessible from local system.
Make sure you can connect host

Use this to check connectivity, try from the local system
>nc 1.2.3.4 8080 -vvv

Step 1:
In the hosting system add A name for domain1.server1.com and www.domain1.server1.com
For A name enter
domain1 – IP Address of Droplet – TTL Time
www.domain1 – IP Address of the same droplet as above – TTL Time

Step 2: Make sure IP is propagated in your hosting countries
Find DNS Propagation, which was registered with hosting company
https://www.whatsmydns.net/

To see A names from the local system or remote system
>dig domain1.server1.com
>dig www.domain1.server1.com

You should be able to see server IP against A record

Step 3: Read and understand. This is for reference only

A project of the Electronic Frontier Foundation
https://certbot.eff.org/

Lets Encrypt
https://letsencrypt.org/getting-started/

Step 4: Install NgInx and test it.
https://phoenixnap.com/kb/install-nginx-on-ubuntu

Add following server block
server
{
listen 80;
listen [::]:80;
server_name domain1.server1.com www.domain1.server1.com;

location /
{
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

Before continue to Step 5, make sure you fulfill the following
https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx

Step 5: Download certificates and enable cron to renew them

How to Secure Nginx with Let’s Encrypt On Ubuntu 20.04 / 18.04

Reference:
https://pavankjadda.medium.com/how-to-deploy-angular-and-spring-boot-apps-behind-nginx-proxy-server-fc623f36edcc

Mistakes:
1) For quick testing, some times engineer redirects traffic on 80 to 8080 through IP Tables.
Disable Them.

2) Don’t depend on outdated google search results. Check for versions.

ReactJS and Spring Boot

How to deploy Spring Boot and ReactJS

Option 1: Using JHipster
https://www.jhipster.tech/

Option 2: Putting code together
https://mukundmadhav.medium.com/build-and-deploy-react-app-with-spring-boot-and-mysql-6f888eb0c600#37fa

View at Medium.com

Option 3: Manually copy build folder to static and build again

-o-

View at Medium.com

Try this approach, we should be able to deploy React and Spring Boot together
https://stackoverflow.com/questions/49817462/react-spring-boot-deployment

*****
https://stackoverflow.com/questions/57040045/how-do-i-serve-a-react-application-from-an-spring-boot-application

Read
https://docs.spring.io/spring-boot/docs/current/reference/html/deployment.html

https://marketplace.digitalocean.com/apps/dokku