Two Birds with One Stone: Caching & TLS in Reverse Proxies with ORDS – HKOUG MeetUp

HKOUG is hosting a meetup on July 31, 2019 in Li Fung Offices.  Tentative Agenda:

18:30 Pizza & Networking
19:00 Presentation
19:45 Q & A, Presentation Feedback

“The benefits of putting ORDS behind a reverse proxy will be considered, not least to allow a standard way to cache requests and handle TLS. Apache HTTP Server, Nginx, Varnish and Hitch will be compared, showing how they can be configured and analyzing their differences. Performance of various configurations will be proved via benchmarks.”

Details can be found in meetup.com

Two Birds with One Stone: Caching & TLS in Reverse Proxies with ORDS

Wednesday, Jul 31, 2019, 6:30 PM

Li Fung Tower
Cheung Sha Wan, HK

2 Oraclers Attending

I’d like to trial a presentation I’ve been working on to get some feedback. Don’t expect a polished presentation, but should be a good excuse to have a catch-up. Abstract as below: The benefits of putting ORDS behind a reverse proxy will be considered, not least to allow a standard way to cache requests and handle TLS. Apache HTTP Server, Nginx, …

Check out this Meetup →

DevCS adds docker, pipeline, dedicate build server supports

New version of DevCS got some nice new features

  • supports dedicate build server(s)
  • new pipeline and pipeline visualization
  • docker builder
  • integration with code scan / analysis

More details can be found in DevCS PM blog post
https://blogs.oracle.com/cloud-platform/oracle-developer-cloud-service-adds-docker,-pipelines,-and-more
and latest documentation
https://docs.oracle.com/en/cloud/paas/developer-cloud/csdwn/index.html

dotnet mvc on Oracle ACCS

In this article, I’m going to briefly walk through how to create and deploy a .net mvc sample app in Oracle Application Container Cloud Service.

Assumptions:

  • you have an Oracle Cloud account, it can be the promotion trial account
  • you have dotnet core installed on your local machine – I’m using dotnet 2.0.0 on MacOS
  • you have the corresponding editor / tools, e.g. I’m using VS Code.
  1. Launch VS Code and open the embedded Terminal. Alternatively, you can also use your favorite editor and/or the OS Terminal (in Windows, that will be the Command Window).

  2. Create and goto (mkdir/cd)  your desire folder and create the mvc project – I will call the project accssample:

mkdir accssample
cd accssample
dotnet new mvc

Screen Shot 2018-03-25 at 11.04.30 AM.png

  1. Open Program.cs file of the project, add .UseContextRoot( )  and .UseUrls( ) in the CreateDefaultBuilder
.UseContentRoot(Directory.GetCurrentDirectory())

.UseUrls("http://*:"+ Environment.GetEnvironmentVariable("PORT"))
Your program will looks like this
Screen Shot 2018-03-25 at 11.14.15 AM

Remember to save the changes.

  1. Use the terminal to update the project dependencies and create a debug build for local testing.
dotnet restore
dotnet build

Screen Shot 2018-03-25 at 11.25.17 AM.png

  1. Test the program locally
export PORT=8080
dotnet run

 

Screen Shot 2018-03-25 at 2.07.15 PM

Open a browser and navigate to http://localhost:8080 to test the app locally

Screen Shot 2018-03-25 at 2.08.12 PM

 

  1. Once we are happy with the app, we can create the release build. We will need to publish to Linux release for ACCS.
dotnet publish -c Release -r linux-x64

Screen Shot 2018-03-25 at 11.42.10 AM

  1. For ACCS to start the program, we will create 2 more files in the distribution (i.e. linux-x64) folder
start.sh
manifest.json

Right click the linux-x64 folder and choose new file, name the first file as manifest.json

Screen Shot 2018-03-25 at 11.43.51 AM

Screen Shot 2018-03-25 at 11.44.11 AM

  1. Enter the contents of manifest and remember to save it. For more info about ACCS manifest, please refer to ACCS documentation https://docs.oracle.com/en/cloud/paas/app-container-cloud/dvcjv/creating-meta-data-files.html

Screen Shot 2018-03-25 at 11.50.31 AM

  1. Repeat the same for the start.sh

Screen Shot 2018-03-25 at 11.50.42 AM

  1. In the terminal window, zip the release, start.sh and manifest.
cd bin/Release/netcoreapp2.0/linux-x64/
zip -rq accssample.zip manifest.json start.sh publish

Screen Shot 2018-03-25 at 12.01.27 PM

  1. The application is now ready to deploy to ACCS. We can either use Web GUI, CLI or REST API to deploy the app.

I’ve a small shell script to execute curl to send REST to deploy the app. I also have a deployment.json file to control the memory and number of instance of the app. The deployment json looks like this

{
        "memory":"1G",
        "instances":"1"
}

this is what I did to deploy the app to ACCS,

 

Screen Shot 2018-03-25 at 1.22.10 PM

and this is what my script looks like – what I actually do is

  • create a storage container
  • put my the zip file in the container
  • create an ACCS app from zip (in storage container)

Screen Shot 2018-03-25 at 2.42.55 PM

  1. We can double check the application deployment from ACCS WebUI (or using CLI / REST API)

Screen Shot 2018-03-25 at 2.48.01 PM

  1. Our sample app is now up and running in ACCS.

Screen Shot 2018-03-25 at 2.48.16 PM

Your Future Today. With Cloud-Native Apps.

Cloud-native to reduce time to market for new projects, boost responsiveness to demand, innovate faster, improve ROI in IT, manage operations and data security efficiently. Discover how:

Your Future Today. With Cloud-Native Apps.

​Time to shift your application development to the cloud? Here are Top 5 business reasons to do it.


EMEAPAC Champions

Jenkins on Oracle BMCS

Last time, I posted the installation of GitLab. So, we have the Git…. what’s next?

A lot of people suggest CI – continuous integration. Thus, I’m going to talk about Jenkins in this post.

ASSUMPTION / PREREQUISITE:

  • we have a BMCS subscription
  • we already create a Linux VM or BM, have the VCN and Internet Gateway setup

We can put Jenkins in the same VM/BM as GitLab, or we can use another VM to run Jenkins.

Steps

  1. Similar to GitLab, the first step here is to get the Jenkins installation binary. We can navigate to Oracle Cloud Marketplace
    https://cloudmarketplace.oracle.com/marketplace/en_US/listing/16132843
    for details
    Screen Shot 2017-08-02 at 9.43.18 AM
  2. Just click the [Get App>] button and follow the instruction. It will guide us throughout the Jenkins installation process.
  3. Actually, what we need to do is to ssh to the VM/BM to download and install Jenkins. In the VM/BM use wget to download Jenkins.
    Screen Shot 2017-08-02 at 10.43.51 AM
  4. The download will take a while. wait for the download to complete. Then change the file permission to so that we can run the installer.
    Screen Shot 2017-08-02 at 10.43.32 AM
  5. In our example, we will install Jenkins in the same VM/BM as GitLab. We will use non-privilliged port to run Jenkins and run it with oracle user.
    Screen Shot 2017-08-02 at 10.45.02 AM
  6. The installer will install Gradle along with Jenkins.
    – Answer [Y] and press [Enter] when it ask for Gradle.
    – Answer [Y] and press [Enter] when it ask you to confirm.
    Screen Shot 2017-08-02 at 10.45.57 AM
  7. Next, the installer will prompt you for installation folder. Enter your desired folder. In our example, we will put it under /u01
    Screen Shot 2017-08-02 at 10.46.53 AM
  8. Enter your desired Jenkins SUPER ADMINISTRATION username and password
    Screen Shot 2017-08-02 at 10.47.56 AM
  9. The installer will then ask you for Apache and Tomcat port to be used for Jenkins. You can just keep the default values.
    Screen Shot 2017-08-02 at 10.48.40 AM
  10. Enter [Y] for the last confirmation and wait for the installation to complete.
    Screen Shot 2017-08-02 at 10.48.55 AM
  11. Jenkins should starts automatically after the installation.

How to start / stop / restart Jenkins

Just navigate to the target folder and use the ctlcscript, e.g.

[oracle@kmean jenkins-2.60.2-0]$ ./ctlscripts.sh start

 

or

[oracle@kmean jenkins-2.60.2-0]$ ./ctlscripts.sh stop

 

Screen Shot 2017-08-02 at 10.53.46 AM

How to access / navigate / login to Jenkins

It is simple, just use a browser and go to
http://your-vm-bm-ip-fqdn:apache-port/
e.g. http://jenkins.mydomain.com:8080/

Screen Shot 2017-08-02 at 10.56.41 AM

Click the [Access Jenkins] link and login with the username/password we’ve entered during installation.

Setting up GitLab in Oracle BMCS

Not sure if you heard something like this 🙂

  • Github is good but I want my own private repo.
  • Well I know you have DevCS, but I want something I can have full control…

Today, I’m going to talk about Bring Your Own Git – I’m going to use GitLab CE as my example.

Assumption / Prerequisite:

  • we have a BMCS subscription
  • we already created a Linux VM or BM, have the VCN and Internet Gateway setup

Steps

  1. The first step is to get the GitLab CE, we can navigate to Oracle Cloud Marketplace
    https://cloudmarketplace.oracle.com/marketplace/en_US/listing/16076589
    for details
    Screen Shot 2017-08-01 at 8.41.35 AM
  2. Just click the [Get App>] button and follow the instructions. It will guide us how to download and install GitLab CE for Oracle BMCS.
  3. Actually, what we need is to ssh to the VM/BM to download and install GitLab. In the VM/BM, use wget to download GitLab
      wget -O gitlab-linux-installer.run \
        https://bitnami.com/stack/gitlab/download_latest/linux-x64

    Screen Shot 2017-08-01 at 10.06.06 AM

  4. The download will take a while, wait for the download to complete
    Screen Shot 2017-08-01 at 10.11.52 AM
  5. Change the file permission so that we can run the installer. Then, we can run the installer. If we want to have GitLab running on privileged port, i.e. 80/443, we will need to run the installer as root (or sudo).
    Screen Shot 2017-08-01 at 10.12.27 AM
  6. The installer will ask us to confirm the installation. Simply answer Y and press enter.
    Screen Shot 2017-08-01 at 10.13.04 AM
  7. Next, the install will ask us to setup the super admin account password for GitLab. Enter the desired password and press enter. Of course, we will need to enter the desired password the second time as confirmation. After that, we will be prompted to continue again – answer Y and press enter at this point.
    Screen Shot 2017-08-01 at 10.14.45 AM
  8. Installation will take a while. Just wait for the completion.
    Screen Shot 2017-08-01 at 10.15.02 AM
  9.  Once we see installation complete, we are ready to rock and roll.
    Screen Shot 2017-08-01 at 10.17.45 AM

How to start / stop the GitLab stack?

To start GitLab, use the command

[oracle@kmean ~]$ sudo /opt/bitnami/ctlscript.sh start

To stop GitLab, use the command

[oracle@kmean ~]$ sudo /opt/bitnami/ctlscript.sh stop

To check the status, use the command
Screen Shot 2017-08-01 at 3.36.39 PM

How to configure / re-configure GitLab?

We will need to edit the config file(s) – we will cover this topic later. BTW, you probably NEED to do reconfigure BEFORE the first run 🙂 just use the command

[root@kmean ~]# gitlab-ctl reconfigure

or sudo gitlab-ctl reconfigure command if you are not running as root user.
Screen Shot 2017-08-01 at 11.59.59 AM
again, reconfigure might take a while
Screen Shot 2017-08-01 at 12.00.19 PM
also, the first time to do reconfigure, we will need to set the GitLab root password again.

How to access my new Git?

It is simple, just use the browse to navigate to the host. I’ll recommend you use SSL port 🙂 https://{your-vm-bm-ip-fqdn}/

Screen Shot 2017-08-01 at 3.47.01 PM

I will cover more about custom configurations, custom SSL/TLS cert, GitLab integration, DevOps in BMCS later 🙂 please stay tuned.

 

Oracle Code Online June 21st @09:30 IST

Register to Oracle Code Online for technical demonstrations and presentations from community advocates, Oracle ACEs, Product Leads and Java Champions. You will be able to chat instantaneously with any questions or comments about the presentation.

Oracle Code Online June 21st @09:30 IST

Register to our online event for technical demonstrations and presentations from community advocates, Oracle ACEs, Product Leads and Java Champions. You will be able to chat instantaneously with any questions or comments about the presentation.


EMEAPAC Champions

Tablet vs iPad

老實講,到底iPad同tablet有幾大分別,令它們有咁唔同嘅命運?

UI – finger, touch, multi touch
Speed – instant on
但係科技進步,呢啲都係相對嘅進步嘟…

最大分別其實係定位。iPad唔係電腦,而係潮物,佢用嘅不單係mac嘅死硬派fans,而且係iphone人口…..

論實際其實真係要用電腦不如用air… iPad…. 諗真,真係唔知要嚟做乜?

玩game睇相聽歌睇片同ebook,有需要重可以email, document, spreadsheet 同 preso…. 四千幾五千好過要部兩頭唔到岸嘅netbook….