Showing posts with label JCS. Show all posts
Showing posts with label JCS. Show all posts

Friday, 26 October 2018

Configuring SSL in JCS/SOAcs Server with PFX certificate file

PFX file is the file generated by windows ISS which contains certificate and private key of the certificate. The steps to apply this certificate on java cloud service or soa cloud service are described below.


  1. Export the certificate with its private key from IIS as .pfx file.
  2. Move the .pfx file to the bin folder of keytool in oracle soacs VM
    • Connect to VM through winscp and move the file using opc user.
    • Connect to the VM through putty and change the permissions (chmod) and change owner (chown).
    • Move the file to /u01 (or some other location of your choice)
  3. Now we need to convert the .pfx file to jks. Use the below command to achieve this,
$JAVA_HOME/bin/keytool -v -importkeystore -srckeystore <<pfx_file>> -srcstoretype PKCS12 -destkeystore <<destincation_jks>> -deststoretype JKS

This will ask for destination password (you have to set new password)
Source password: Enter the password of pfx private key
  • View the content of the newly created JKS to obtain the original alias of private key

$JAVA_HOME/bin/ keytool -list -v -keystore <<jks_keystore_created_above>>
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: <<alias will be printed here>>
  • Change the original alias to a simpler alias
$JAVA_HOME/bin/keytool -keystore <<new_keystore.jsk>> -storepass <<password>> -changealias -alias <<original_alias>> -keypass <<orinial pfx password>> -destalias <<new _alias>>
  • Now the new JKS file is ready which needs to be used as weblogic identity store.
  • Login to weblogic admin console, Lock & edit.
  • Navigate to environment à servers.
  • Select admin server, click on keystores tab
  • Change the keystore to “Custom Identity and Java Trust Store”
Custom Identity Store = <<path of new JKS>>
Custom Identity Keystore Type = JKS
Custom Identity Keystore Passphrase = <<keystore password>>
Confirm Custom Identity Keystore Passphrase = << keystore password >>
  • Go to SSL tab
Private Key Alias= <<Alias that you created in step 5>>
Private Key Passphrase = <<password of private key>>
Confirm Private Key Passphrase = <<password of private key>>
  • Save & Release Configuration.
  • Restart the SSL (from Environment à Servers, control tab)
  • Repeat the above five steps for each managed server.
  • Restart the SSL of each server. Now you can access your server/apps over https.

Friday, 18 May 2018

Building ADF applications using Developer cloud service

In this post I will be demonstrating the steps required to build ADF applications using Oracle Developer Cloud Service. I will be using ant to do the build activity, the steps are more or less same even if you are planning to use maven.

  • Create a project and repository in developer cloud service.
  • Check-in all your project code to GIT repository of developer cloud service.
  • Generate the build files (build.xml and build.properties) if not present in your project.
  • Jdeveloper generated build files will work when build in your local environment, when you need to build it in developer cloud service, you need to tweak the files a bit. 
build.properties file

oracle.commons=../../../../oracle_common/
install.dir=../../../..
oracle.home=${env.ORACLE_HOME_12C3}
oracle.jdeveloper.workspace.path=${env.WORKSPACE}/SampleBuildApp.jws
middleware.home=${env.MIDDLEWARE_HOME_12C3}
workspace=${env.WORKSPACE}
oracle.jdeveloper.ant.library=${env.ORACLE_HOME_12C3}/jdev/lib/ant-jdeveloper.jar
oracle.jdeveloper.deploy.dir=${env.WORKSPACE}/ViewController/deploy
oracle.jdeveloper.ojdeploy.path=${oracle.home}/jdev/bin/ojdeploy
javac.nowarn=off
oracle.jdeveloper.project.name=ViewController
oracle.jdeveloper.deploy.outputfile=${env.WORKSPACE}/deploy/${profile.name}
output.dir=classes
javac.deprecation=off
oracle.jdeveloper.deploy.profile.name=*
javac.debug=on

  • Change SampleBuildApp.jws to your application name.
build.xml file

<?xml version="1.0" encoding="windows-1252" ?>

<project xmlns="antlib:org.apache.tools.ant" name="SampleBuildApp" basedir=".">
  <property environment="env" />
  <property file="build.properties"/>
  <target name="deploy" description="Deploy JDeveloper profiles">
    <taskdef name="ojdeploy" classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask" uri="oraclelib:OJDeployAntTask"
             classpath="${oracle.jdeveloper.ant.library}"/>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask" executable="${oracle.jdeveloper.ojdeploy.path}"
                  ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
                  ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
      <ora:deploy>
        <ora:parameter name="workspace" value="${oracle.jdeveloper.workspace.path}"/>
        <ora:parameter name="profile" value="${oracle.jdeveloper.deploy.profile.name}"/>
        <ora:parameter name="nocompile" value="false"/>
        <ora:parameter name="outputfile" value="${oracle.jdeveloper.deploy.outputfile}"/>
      </ora:deploy>
    </ora:ojdeploy>
  </target>
</project>

  • Don't forget to add the property environment (highlighted in red).
  • Check-in these files to developer cloud service.
  • Create a new build job by selecting the application git repository as source and deploy as build task and in the post build steps select Archive the artifact option and enter deploy/*.ear in files to archive field.
.

  • Run the build operation by clicking build now button.
  • Once the build is completed, you can find the .ear file under deploy folder of artifacts.

  • You can take this file and deploy in you JCS or on-premises environment.