Thursday, April 28, 2016

#496 - IaaS / PaaS Partner Roundtable hits Warsaw

Great event and a magnificent location, affording great city views.

Great resonance from the participants, especially in respect of 
Public Cloud Machine.







































Public Cloud Machine whitepaper here




Wednesday, April 27, 2016

#495 IaaS - Deploying Docker on Oracle Compute Service



We all know docker - Build, Ship and run anywhere.
So how does this work with Oracle Compute Cloud Service?


Docker containers are essentially lightweight virtualized environments, containing everything you need to run your app.

Step 1 Install docker

Here I install docker on my vm.

Firstly, I update the yum repository.
More info on yum here

Make sure that you are UEK 4.x compatible.

If not, then update -

[ol6_UEKR4]
name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR4/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1

[ol6_UEKR3_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0

[ol6_UEK_latest]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0


copy the above to your /etc/yu.repos.d/public-yum-ol6.repo file

then run sudo yum update

Once this is complete, then install docker -

sudo yum install docker-engine









Step 2 -Start docker

sudo service docker start






do the sanity test -
sudo docker run hello-world


















Now, let's run an Ubuntu container -

docker run -it ubuntu bash
















docker containers are stored here -






Good article on getting started with docker available here


Thursday, April 21, 2016

#494 IaaS - Rapid provisioning of vms thru Orchestration




What is Orchestration?

From the Oracle docs (Bold/Italic) -

An orchestration defines the attributes and interdependencies of a collection of compute, networking, and storage resources in Oracle Compute Cloud Service. You can use orchestrations to automate the provisioning and lifecycle operations of an entire virtual compute topology.
For example, you can use orchestrations to create and manage a collection of instances hosting a multitiered application stack with all the necessary networking, storage, and security settings.

Some Terminology up front

oplan - Object plan, the primary building block of an orchestration. 
An orchestration can have up to 10 oplans.

obj_typeAn object type refers to the Oracle Compute Cloud Service resource that you want to create. 

Here is the list of valid obj_types - 



objects - The objects attribute defines the properties or characteristics of the the Oracle Compute Cloud Service resource that you want to create, as specified by the obj_type attribute.

For example, if you want to create a storage volume, the obj_type would be storage/volume, and the objects would include size and bootable. If you want to create an instance, the obj_type would be launchplan, and the objects would include instances, along with instance-specific attributes, such as imagelist and shape.



You can create relationships between different oplans, e.g. one plan to create the instance, the other to create the storage volume.

Simple Example 

This simple example will have 2 parts -

  1. Instance Orchestration to manage my VM instance
  2. Volume Orchestration to manage storage volumes

From what I said earlier, would could also include a master that ties the other 2 together via a relationship.

So what does it look like?

Let's start with the volume orchestration -

I begin with a screenshot of the UI for creating Storage Volumes -



Here is the equivalent orchestration -

"description": "NiallC Simple orchestration plan for volume creation",
"name": "/Compute-YourIdentityDomain/yourUser/volumeCreation",
"oplans": [
{
"label": "NiallC-StorageVolumes",
"obj_type": "storage/volume",
"ha_policy": "monitor",
"objects": [
{
"name": "/Compute-YourIdentityDomain/yourUser/ncvol2",
"size": "2G",
"index": 1,
"properties":["/oracle/public/storage/default"]



Now, let's look at the instance orchestration -
Again, here is the creation UI -
















Here is the equivalent orchestration -

{
"description": "NiallC orchestration plan for instance creation",
"name": "/Compute-YourIdentityDomain/yourUser/instanceCreation",
"oplans": [
{
"label": "NiallCInstances",
"obj_type": "launchplan",
"ha_policy": "active",
"objects": [
{
"instances": [
{
"imagelist" : "/oracle/public/OL-6.6-20GB-x11-RD",
"label": "NC-Instance",
"storage_attachments": [
{
"index": 1,
"volume": "/Compute-YourIdentityDomain/yourUser/ncvol2"
}
],
"networking": {
"eth0": {
"seclists": [
"/Compute-usorclptsc52741/default/default"
],
"nat": "ippool:/oracle/public/ippool"
}
},
"shape": "oc3",
"sshkeys": [
"/Compute-YourIdentityDomain/yourUser/nc-pub-key"
]
}
]
}
]
}
]
}































I upload these  2 orchestrations and start the volumeCreation -



The status then changes to ready -


I check in the storage tab, my volume has been created.





I now start the instance orchestration -

















I check for the Instance and here it is -








Wednesday, April 20, 2016

#493 IaaS - Adding Storage Volumes to a running instance



We begin with a refresher -

A temporary, non-persistent storage volume is associated with your Compute Cloud instance on creation. Your instance boots from this nonpersistent storage volume.

What if you want to save applications or data on your instance?
Then you must create a persistent storage volume and attach it to your instance.
If necessary, you can also specify a bootable storage volume. Using a bootable storage volume
allows you to save any configurations made to your instance at OS level.
This allows you to delete from instance and create it again without losing your OS configurations.































Once created, we can attach it to one of our instances, from the previous post.




















Please note: 

The disk number you specify here determines the device name.

The disk attached at
index 1 is named /dev/xvdb,
the disk at index 2 is /dev/xvdc,
the disk at index 3 is /dev/xvdd, etc.







Now I ssh into my vm.















Note disk xvdc above.

Now I create a disk partition -

sudo fdisk /dev/xvdc
















I now create a file system - sudo mkfs -t ext3 /dev/xvdc1

Now mount - sudo mount -t ext3 /dev/xvdc1 /u01
























Tuesday, April 19, 2016

#492 IaaS - Communication between Instances

Introduction

Many scenarios here, weblogic communicating with the database, for example.

I am going to make it even easier.
I will just create a second instance, as per the post #490.





Now I want to open communications between these 2 Oracle cloud instances.
I will open port 23 for tcp.


Step 1 is to create a new Security List



























Step 2 is to add the Instance to the Security List
















I do the same for VM1.
Here I create a new Security list - NiallC-VM-DB-Seclist























Step 3 is to create a Security Application, essentially opening port 23 for tcp

































Step 4 is to create a Security Rule leveraging the above Security Application
and the 2 Security Lists















Testing via Telnet

I have installed telnet server on VM1










I have installed telnet client on VM, and, as you can see,
I can connect successfully.









































#491 IaaS - Configuring Network access

Leading on from the previous example -

Here I login via ssh to my vm.











I start the http server -












I can access the test page -















Now I create a Security List -




Now I add my instance to this security list -

























 










I try and access the http server -








Now, I will create a security rule to enable access -





































Now, I think the above is self-explanatory, but just in case...

Security Application - protocol I want to use, in my case, http.

Source - where I am coming from, in my case the public internet. I am trying access
the http server from my laptop.

Destination - where I want to get to - NCVM. My vm is attached to the specified security list.





I now retry in my browser -
















Simple yet effective...