Saturday, August 08, 2020

Teamcenter 12 in Docker

 High level steps for now. To be updated with more details. 


1. Remove old docker and install the latest stable.

2. Update listener to connect from remote, enable service (systemd)

3. Enable ip forwarding on docker host

4. Increase max size of docker image (i.e. 30G)

5. Create TC network (bridge) for all TC containers.

6. Create Oracle Image (18.3.0-ee), with customer scripts supplied for Teamcenter

Env: ORACLE_SID, ORACLE_PDB, ORACLE_PWD, ORACLE_CHARACTERSET

Volume: map local script directory to /opt/oracle/scripts/startup

Hotname: provide meaningful hostname

Network: tcnetwork

Custom Script: create TC table space, schema, and import corporate dump, update volume definition. 

Note: run custom script after PDB is in READ WRITE status.

7. Create FMS container, publish 4544. Use mapped volume for TC_ROOT/TC_LOGS/TCVOLS

8. Create License container, publish 28000-28001 (use fixed vendor daemon port 28001 in license file)

9. Create TCServer container with web/pool and FSC slave included. Publish 8080 (Tomcat), 8081 (jmx, if needed), 8087 (mux). use mapped TC_ROOT/TC_DATA/TCLOGS/WEBAPPS. If Load Balancer is configured (step #10), then publishing 8080 port is optional. 

Reload FMS preference into database if the new containers don't match the configurations in the corporate schema template (bootstrap URLs, default TV ID, etc.)

TcServer can be created multiple times for scalability purpose (TcServer1, TcServer2, ...)

TcServer container runs a custom script as entry point which updates configuration files on the fly before starting all services, i.e. FSC Slave scripts and configurations as each TCServer needs a unique FSC ID as slave.

Each TcServer provision it will add new FSC instance into FMS Master configuration. Make sure FMS Master (on FMS container) reload configuration on the fly when new TCServer provisioned. 

10. Create nginx container as load balancer, as there can be multiple TcServer containers provisioned. It publish only 80 (and 443 if SSL), and distribute across all the Tomcat in each TcServer containers.

Overall creation of docker containers:

* Oracle 18.3.0-ee Base: 7m

* Oracle runtime creation: 10m

* TC FMS/LIC Base: 6m

* TC Server Base: 5m

* TC runtime (FMS/LIC/WEB-POOLx2): 1m

* TC NGINX LB runtime: 1m


Docker Status:


Teamcenter Active Space (Load Balancer):


How to permanently delete Facebook accounts

 


Delete Facebook Account

Delete Instagram Account

Delete Whatsapp Account

Deactivate Facebook Messenger



Wednesday, December 05, 2018

"Diff with Vim" for Mac

Being a Unix/Linux user for many years and using VI/VIM almost everywhere. gVim for windows has the nice "diff with vim" context menu for quick files comparison, and has been missed the most from MacVim.



Here is how to create your own "Diff with Vim" context menu.

1. Create a "Quick Action" (aka Service) from Automator

2. From action library select "Utilities" then drag "Run shell script" to your workflow.

3. Adjust the action input: Workflow receives current "Files or folders" in "Finder.app"

4. Select "/bin/bash" as shell

5. type in the following

if [ $# -ge 2 ]; then
    /usr/local/bin/mvim -d "$@"
else
osascript 2>/dev/null <<EOF
    set theDialogText to "Please select at least two (2) files."
    display dialog theDialogText buttons {"I'm silly"}
EOF
fi

Here assumed you installed MacVim using HomeBrew. If you use MacPorts you may have it under "/opt/local/bin/mvim". Make sure you do have the mvim wrapper scripts installed.

6. Pass Input: "as arguments"

Now save your workflow (it will be saved in ~/Library/Services directory)

7. Go to preferences -> Keyboard -> Shortcuts. from "Sevices" category, make sure "Diff with Vim" is selected

8. Go back to your Finder (Desktop, or any folder where has files). select two files or more, text file is preferred even you can compare any type of files technically.

Vola ~ now you see the familiar vimdiff window on Mac. You don't have to run `vimdiff file1 file2 ...` in Terminal anymore :-)




Thursday, November 08, 2018

CentOS/RedHat 7 OpenLDAP Proxy


This post still using SLAPD configuration files which is getting obsoleted. But still works.



# yum install openldap-servers


# vi /etc/openldap/slapd.conf
--------------------------------------------------------------------
# Global Schemas.
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/nis.schema

# Global Options.
conn_max_pending 1000
sockbuf_max_incoming 4194303
pidfile  /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args

sizelimit unlimited
limits * size.pr=0 size.prtotal=none

# Allow everything that can be retrieved to be read
readonly on
access to *
       by * read

# LDAP Proxy Options
modulepath /usr/lib64/openldap

loglevel stats
#loglevel none
#loglevel any


# module for the target ldap-server
moduleload back_ldap.la

# Type of database
database ldap
uri "ldaps://your_ldap_server.test.com"
suffix "your_ldap_search_suffix"

# If your ldap server requires binding, then 
rootdn "bind_user_dn"
rootpw "xxxxxx"

conn-ttl 3600

--------------------------------------------------------------------

Add configuration option to 

# vi /etc/sysconfig/slapd

# Any custom options
SLAPD_OPTIONS="-f /etc/openldap/slapd.conf"

Try starting SLAPD proxy

# systemctl start slapd.service


If your firewall stop running, stop it for test.
Or add rule to allow 389 (or 636 if LDAPS) port to go through

# systemctl stop firewalld
# systemctl disable firewalld









Thursday, February 01, 2018

Ryzen 7 build on Dan case A4-SFX v2

I have been using my new Ryzen 7 PC without case for more than two months now. The Dan case took longer to deliver. I'm very excited that finally I can start tucking everything inside this tiny good looking case.

Part List: 
- Ryzen 7 1700x
- Asrock AB350 ITX/ac
- Corsair DDR4 Vengeance DDR4 3000 16x2
- Corsair SF600 SFX 80Plus Gold
- EVGA GTX 1060 SSC
- Samsung Evo M2 500G
- Noctua NH-L9a-AM4

Pictures to be added.

Sunday, December 27, 2015

Setup a VPN free home office

Right we don't really like the VPN client provided by corporate or the customer you support.. dedicate client needed, multi-factor authentication, platform dependent... especially when you have multiple clients you need to use every day.

As a poor IT guy like me you may have tried getting a socks proxy through SSH tunneling, and you liked it...

Sunday, October 25, 2015

Install ESXi 6.0 on HP ZBook 15 Mobile Workstation

It used to be pretty hard to install ESXi on HP Laptop but since 6.0 VMware made it pretty easy to do so. below is what I did on my ZBook 15 G1 laptop.

The hardware
It's a whole flash ESXi setup with three SSD drives:

Friday, October 02, 2015

ESXi 6.0 works on A1SAI-2750F OOTB

Back in version 5.5 it has issue with the Intel Giga ethernet but now much easier :) The board really has enough power to run a home lab using vSphere, only one thing missing would be VT-d...