Open the navigation menu and click Developer Services. Under DevOps, click Projects.
Create project for the kuberenetes.
For Environment type, select Oracle Kubernetes Engine.
Enter a name and optional description for the environment.
(Optional) To add tags to the environment, click Show tagging options. Tagging is a metadata system that lets you organize and track the resources in your tenancy. If you have permissions to create a resource, you also have permissions to add free-form tags to that resource. To add a defined tag, you must have permissions to use the tag namespace.
Click Next.
Select the region where the cluster is located.
Select the compartment in which the cluster is located.
Select an OKE cluster. You can select either a public or a private cluster.
In this post I will show you how to launch and connect to a Windows instance.
Create a cloud network and subnet that enables internet access
Launch an instance
Connect to the instance
Add and attach a block volume
I already posted a post how to Launch Linux Instance on OCI here, in the post you will have to follow the first two steps which is creating
Choose a compartment for your resources.
Create a cloud network.
Once you are done, you can start with steps #3 which will allow you to launch a instance – windows one.
Open the navigation menu and click Compute. Under Compute, click Instances.
Click Create instance.
In the Placement section, accept the default Availability domain.
In the Image and shape section, do the following:
In the Image source list, select Platform images.
Select Windows. Then, in the OS version list, select Server 2019 Standard.
Review and accept the terms of use, and then click Select image.
In the Shape section, click Change Shape. Then, do the following:
For Instance type, accept the default, Virtual machine.
For Shape series, select AMD, and then choose either the VM.Standard.E4.Flex shape or the VM.Standard.E3.Flex shape (it doesn’t matter which). Accept the default values for OCPUs and memory.
The shape defines the number of CPUs and amount of memory allocated to the instance.
In the Networking section, configure the network details for the instance. Do not accept the defaults.
For Primary network, leave Select existing virtual cloud network selected.
Select the cloud network that you created. If necessary, click Change Compartment to switch to the compartment containing the cloud network that you created.
In the Boot volume section, leave all the options cleared.
Your instance now is ready.
Connect to the windows instance done by using Remote desktop, enter the public ip, username which is (opc), and the password.
The first resource you create is the cloud network. Open the navigation menu, click Networking, and then click Virtual Cloud Networks.
Select the Sandbox compartment (or the compartment designated by your administrator) from the list on the left, as shown in the image. If the Sandbox compartment does not exist, you can create it as described in Creating a Compartment.
Create a cloud network.
Open the navigation menu, click Networking, and then click Virtual Cloud Networks.
Click Start VCN Wizard.
Select Create VCN with Internet Connectivity, and then click Start VCN Wizard.
Enter the values depends on what you want press next.
Launch an instance.
Open the navigation menu and click Compute. Under Compute, click Instances.
Click Create instance.
Enter a name for the instance, for example: <your initials>-Instance. Avoid entering confidential information.
In the Placement section, accept the default Availability domain.
In the Image and shape section, make the following selections:
In the Image section, accept the default, Oracle Linux.
In the Shape section, click Change shape. which will allow you to choose the instance size.
In the Networking section, For Primary network, leave Select existing virtual cloud network selected and For Subnet, leave Select existing subnet selected.
Select the Assign a public IPv4 address option. This creates a public IP address for the instance, which you need to access the instance. If you have trouble selecting this option, confirm that you selected the public subnet that was created with your VCN, not a private subnet.
In Add SSH keys section, generate an SSH key pair or upload your own public key
Regarding to Wikipedia, Serverless computing is a cloud computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity
Today i will show you an example how to create serverless website but this time not using Amazon AWS, Azure or OCI but Alibaba Cloud Provider.
Create a Function Compute Service
Go to the console page and click through to Function Compute.
Click the add button beside Services.
In the Service slide out, give your service a name, an optional description, and then slide open the Advanced Settings.
In Advanced Settings you can grant access for Functions to the Internet, to VPC resources, and you can attach storage and a log service to a Function. You can also configure roles.
For our tutorial, we will need Internet access so make sure this configuration is on.
We will leave VPC and Log Configs as they are.
In the Role Config section, select Create New Role, and in the dropdown list pick AliyunOSSReadOnlyAccess as we will be accessing our static webpages from an Object Storage Service bucket.
Click Authorize.
You will see a summary of the Role you created.
Click Confirm Authorization Policy.
You have successfully added the Role to the Service.
Click OK.
ou will see the details of the Function Compute Service you just created.
Now let’s create a Function in the Service. Click the add button next to Functions.
You will see the Create Function process. The first part of the process is Function Template.
There are many Function Templates available, including an empty Function for writing your own bespoke Functions.
Alibaba Cloud-supplied Template Functions are very useful as they have relevant method invocation and demo code for getting started quickly with Function Compute.
let’s choose the flask-web Function written in Python2.7.
Click Select.
We are now at the Configure Triggers section of creating a Function.
Select HTTP Trigger from the dropdown list. Give the Trigger a name and choose Authorization details (anonymous does not require authorization).
Choose your HTTP methods and click Next. We are going to build a simple web-form application so we will need both the GET and POST HTTP methods.
Now we arrive at the Configure Function Settings.
Give the Function a name then scroll down to Code details.
We’ll leave the supplied code for now. Scroll down to below the code sample.
You will see Environment Variable input options and Runtime Environment details.
Click Next.
Click Next at Configure Function Permissions.
Verify the Configuration details and click Create.
You will arrive at the Function’s IDE. Here you can enter new code, edit the code directly, upload code folders, run, test, and fix your code.
Scroll down.
Copy the URL as we will need to add this to our static webpages so they can connect to our Function Compute Service and Function.
Set Up and Configure an OSS Bucket
Click through to Object Storage Service on the Products page.
If you haven’t yet activated Object Storage Service, go ahead and activate it. In the OSS console, click Create Bucket.
Choose a name for the OSS Bucket and pick the region – you cannot change the region later. Select the Storage Class – you also cannot change this later.
We have selected Public Read for the Access Control List.
When you’re ready, click OK.
You will see the Overview page for your bucket. Make a note of the public Internet URL.
In the Files tab, upload your static web files.
I uploaded a simple index.html homepage and a background picture.
In Basic Settings, click Configure to configure your Static Pages.
Add the homepage details and click Save.
Now go to a new browser window and access the OSS URL you saved earlier.
Back in the Function Compute console, you can now test the flask-app paths directly from the code.
We already tested index.html with no Path variable. Next, we test the app route signin with GET and check the Headers and status code.
The signin page code is working correctly. You can also check the Body to make sure the correct HTML will render on the page. Notice that because I entered the path variable, signin is appended to the URL.
Of course, any errors you encounter will show up in the Logs section for easy debugging.
Now, let’s test this page on the Internet.
If you get an error here, implement a soft link for the page in OSS. Go to the OSS bucket and click More dropdown for the HTML file in question and choose Set soft link.
Give the link a name and click OK.
A link file will appear in the list of static files and you will now be able to access the page online with the relevant soft link and it will render as above.
Back in Function Compute, we can test the POST method in the console with the correct username and password details in the same way.
Add the POST variables to the form upload section in the Body tab.
This post provide steps for downloading and installing both Terraform and the Oracle Cloud Infrastructure Terraform provider.
Terraform Overview
Terraform is “infrastructure-as-code” software that allows you to define your infrastructure resources in files that you can persist, version, and share. These files describe the steps required to provision your infrastructure and maintain its desired state; it then executes these steps and builds out the described infrastructure.
Infrastructure as Code is becoming very popular. It allows you to describe a complete blueprint of a datacentre using a high-level configuration syntax, that can be versioned and script-automated, Terraform can seamlessly work with major cloud vendors, including Oracle, AWS, MS Azure, Google, etc
Download and Install Terraform
In this section, i will show and explain how to download and install Terraform on your laptop/PC Host Operating System, you can download using the below link :-
After you download the terraform, Unzip the Terraform to whatever location you want to run it from. Then, add that location to your OS PATH.
Windows : By adding to Path –> environment variables
Linux : Profile –> export Path
You can check by run the CMD and check the version:-
Check Terraform commands
Download the OCI Terraform Provider
Prerequisites:-
OCI User credentials that has sufficient permission to execute a Terraform plan.
Required keys and Oracle Cloud Infrastructure IDs (OCIDs).
The correct Terraform binary file for your operating system
Installing and Configuring the Terraform Provider
In my personal opioion about this section (The title of the section same as Oracle Documentation) I found it wrong, i worked with Terraform in different cloud vendor, AWS, Azure and OCI so Terraform will recognize it and automatically install the provider for you.
to do that, all of you have to do is create folder , then create file “variables.tf” that only contains
provider "oci" {<br>}
and run terraform command
terraform init
Now Let’s Talk small examples about OCI and Terraform, First you have to read “Creating Module” to understand the rest of this post here.
I will upload to my Github here Small Sample for OCI Terraform to allow you underatand how we can use it instead of the GUI and make it easy for you.
I upload to my github example of Terraform for OCI Proiver, In the this example i will create autonomous database but not using the GUI,
to work with Terraform, you have to understand what is the OCI Provider and the parameters of it.
The Terraform configuration resides in two files: variables.tf (which defines the provider oci) and main.tf (which defines the resource).
Terraform configuration (.tf) files have specific requirements, depending on the components that are defined in the file. For example, you might have your Terraform provider defined in one file (provider.tf), your variables defined in another (variables.tf), your data sources defined in yet another.
The provider definition relies on variables so that the configuration file itself does not contain sensitive data. Including sensitive data creates a security risk when exchanging or sharing configuration files.
Variables in Terraform represent parameters for Terraform modules. In variable definitions, each block configures a single input variable, and each definition can take any or all of three optional arguments:
Type (Optional): Defines the variable type as one of three allowed values: string, list, and map. If this argument is not used, the variable type is inferred based on default. If no default is provided, the type is assumed to be string
Default (Optional) : Sets the default value for the variable. If no default value is provided, the caller must provide a value or Terraform throws an error.
Description (Optional) : A human-readable description of the variable.
Output variables provide a means to support Terraform end-user queries. This allows users to extract meaningful data from among the potentially massive amount of data associated with a complex infrastructure.
output "InstancePublicIPs" {
value = ["${oci_core_instance.TFInstance.*.public_ip}"]
}
Resource Configuration
Resources are components of your Oracle Cloud Infrastructure. These resources include everything from low-level components such as physical and virtual servers, to higher-level components such as email and database providers, your DNS record.
Many of you knows that Oracle annouced before one month, the six track from Oracle university included the exams for free, so far i completed four of them and looking for the other two.
in this post i will discuss how to preapre for exam 1z0-1084-20, in my opioion, this exam it’s more DevOps exam, so if you know the knowledge with Docker and Kubernetes and worked on them, working with OCI (Oracle Cloud Infrastrcuture) before, go ahead and apply for this exam.
The funny thing when you pass one exam and post about it on the social media directly i start recieving multiple messages from different people i don’t know, asking “could you please provide us with the dumps ?” first of all, how did you assume i am using dump, i failed mulitple times in different Oracle exam, second, i am aganist the dumps for various reasons, the exam is prove that you are ready to go thru this track and work on it, imagine you put this on your resume and someone asked you question about it, it will not be professional for you.
However, i would like to discuss 1z0-1084-20 specially this one, because i didn’t feel it’s only related to Oracle, you should have knowledge with different criteria,
Docker
Kubernetes
Microservices
software architect patterns
Testing patterns
For sure OCI
When you are study for this exam, you should follow Lucas Jellema Blog here and you can follow him on twitter also.
This blog saved me alot of time and explained everything you need to know in details.