Friday, November 17, 2023

Create AKS Cluster and deploy spring boot app

Create ACR:

az login

AKS_RESOURCE_GROUP=pmca-aks-rgroup                                               
AKS_REGION=centralus
AKS_CLUSTER=pmca-aks-demo-cluster
ACR_NAME=pmcaacrhellodemo
az aks update -n ${AKS_CLUSTER} -g ${AKS_RESOURCE_GROUP} --attach-acr ${ACR_NAME}

Upload image to : 

Step1: Create docker images like (mention platform):

docker build --platform linux/amd64 -t pmca-engine:1.1 .

tag the image:
docker tag pmca-engine:1.1 pmcaacrhellodemo.azurecr.io/pmca-engine:v2

Push it to ACR:
docker push pmcaacrhellodemo.azurecr.io/pmca-engine:v2



Run into AKS 

az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER}

 AKS_RESOURCE_GROUP=pmca-aks-rgroup                                               

AKS_CLUSTER=pmca-aks-demo-cluster

AKS_REGION=centralus

ACR_NAME=pmcaacrhellodemo

az aks update -n ${AKS_CLUSTER} -g ${AKS_RESOURCE_GROUP} --attach-acr ${ACR_NAME}



az aks get-credentials --resource-group ${AKS_RESOURCE_GROUP} --name ${AKS_CLUSTER}


Friday, May 29, 2015

jasper font problem in Ubuntu

I was getting "Font 'Arial' is not available to the JVM. See the Javadoc for more" this error in Ubuntu.
To fix it I install ttf-mscorefonts-installer package using apt-get
Then cp /usr/share/fonts/truetype/msttcorefonts/*.ttf  JAVA_HOME/jre/lib/fonts/

Sunday, May 24, 2015

Spring-Hibernate-JPA session open in JSP

Just a small mistake kills 4-5 hrs while I was configuring a open Spring-Hibernate-JPA session for JSP. (I know it's not the best practice but as a quick fix I did it) web.xml <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value> </context-param> <servlet> <servlet-name>appServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value></param-value> </init-param> <!-- Here was the error <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value> </init-param> --> <load-on-startup>1</load-on-startup> </servlet> <filter> <filter-name>openEntityManagerFilter</filter-name> <filter-class> org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter </filter-class> <init-param> <param-name>entityManagerFactoryBeanName</param-name> <param-value>entityManagerFactory</param-value> </init-param> </filter> <filter-mapping> <filter-name>openEntityManagerFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> The openEntityManagerFilter filter do the magic here :) It takes entityManagerFactory from the application servlet and does the tricks.

Tuesday, March 24, 2015

fixed! java.net.UnknownHostException: tiles.apache.org

Reason why I get java.net.UnknownHostException: tiles.apache.org when I'm off-line is a silly mistake in my tiles definition xml at WEB-INF/layouts/layouts.xml :

I have version mis-match at DOCTYPE : 2.0 at DTD Tiles Configuration and 3.0 at file name tiles-config_3_0.dtd.
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
So even though I have dtd file in my local lib
org/apache/tiles/resources/tiles-config_3_0.dtd at WEB-INF/lib/tiles-core-3.0.1.jar
the server is looking for the dtd from internet. The fix is simple : place same version 3.0 in both point
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">

Thursday, September 18, 2008

My new home page

Hi I've launched my new homepage at http://nahidmahbub.com/
Your comment on it is appreciable :)

Saturday, December 1, 2007

Some new photos uploaded

Hi,
I have uploaded some new photos
here http://picasaweb.google.com/nahidshahin

Hi !!!

I was arrived 4th September in Trento. By the gress of almighty I came here with no trouble. In Train I've got one of my friend who live in London. It was a miracle, isn't it !!!
I have lost on of my Bag at Malpensa Airport terminal but after 1 week a guy from "Lost and Found" department come to my home with my lost bag :-)
So every thing was fine.