Tuesday, June 28, 2022

NFS command to start when server boots up

 OS is Ubuntu20.

I tried to find /etc/rc.local and /etc/rc.d/rc.local but didn't find any.

So i edited crontab -e

@reboot sudo mount 10.0.0.124:/home/ubuntu/f5imagine.com f5imagine.com/


Restart crond


It works



Wednesday, June 22, 2022

How to create Oracle Cloud FREE Trial Account

 How to create Oracle Cloud FREE Trial Account 


Here is the step by step process.

Open a browser and hit ORACLE CLOUD

You will be presented with a registration page.


Input the above details.

Once you have entered a valid email address, select the Verify my email button.


Go to your email. You will see an account validation email from Oracle in your inbox. The email will be similar to the following

 


Select the link (if possible) or copy and paste the link into your browser.

Enter the following information to create your Oracle Cloud Free Tier account.

Choose a Password
Enter your Company Name

Your Cloud Account Name will generate automatically based on your inputs. You can change that name by entering a new value. Remember what you wrote. You'll need this name later to sign in.

Choose a Home Region. Your Home Region cannot be changed once you sign-up. Note: Based on the current design of the workshop and resource availability, it is

recommended not to use the London region for this workshop at this time. Click Continue 


Enter your Address information. Click Continue.


Choose your country and enter a mobile number for verification. Click the Text me a code button.

Once you receive your code, enter it and click Verify My Code.


Click the Add payment verification method button.


Choose the verification method. In this case, click the Credit Card button. Enter your information and payment details.

Note: This is a free credit promotion account. You will not be charged unless you elect to upgrade the account. 

Once your payment verification is complete, review and accept the agreement by clicking the check box. Click the Start my free trial button.


Your account is provisioning and should be available soon! You might want to log out as you wait for your account to be provisioned. You'll receive two emails from Oracle. One email will be the initial notification that provisioning is underway. The other email will be a notification that provisioning is complete. Here is a copy of the final notification:


 




 

 


 

 







Wednesday, June 15, 2022

How to setup OCI load balancer

 How to setup OCI load balancer

Here we have 2 webservers. In front of this webservers we will have this OCI LB. Configuration of LB is Weighted Round Robin.

Domain or IP : 1

http://api1v2.f5imagine.org/



Domain or IP : 2


http://api2v2.f5imagine.org/


Login to your to your OCI dashboard. Under Netowking, Load balancer, Create a LB










Now access your LB IP. Each request will go to each web server.

Saturday, March 26, 2022

InsufficientServicePermissions - Permissions granted to the object storage service principal to this bucket are insufficient

 In OCI, Object Storage, I am getting the below error when trying to create "Lifecycle Management Policy" using REST API.

{

    "code": "InsufficientServicePermissions",

    "message": "Permissions granted to the object storage service principal \"objectstorage-eu-frankfurt-1\" to this bucket are insufficient."

}

Fix the problem:

Create a policy and add the following

Allow group Administrators to read buckets in tenancy

Allow group Administrators to manage objects in tenancy where any {request.permission='OBJECT_CREATE', request.permission='OBJECT_INSPECT'}

Allow service objectstorage-ap-mumbai-1 to manage object-family in tenancy

 

Saturday, March 19, 2022

How to install and setup your Ansible

 We all know that, Ansible is a configuration management tool. Ansible is a simple IT automation tool.

Here in this blog post, I will teach you the very very basic of Ansible.

First of you, I prefer you to install ansible master/control node in your laptop or your workstation.

The installation is very straight forward.

yum install ansible or apt-get install ansible

Verify the version by ansible --version

Configuration file of ansible will be /etc/ansible/ansible.cfg

Let's add one server to your ansible.

Open the file /etc/ansible/hosts

Add the FQDN or IP of the server which you need to install some package to test and save the file.

Ansible works on SSH. Make sure that from your control node/master node you should able to ssh to the other server. If no, please use sshkey password less login.

ansible all -m ping
If you see a response similar to this, then all set you go to your first ansible playbook

aserver.example.org | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}



Thursday, February 10, 2022

Terraform Error: Failed to query available provider packages

Terraform error when executing terraform init command

 Terraform Error: Failed to query available provider packages

Could not retrieve the list of available versions for provider hashicorp/oci: no available releases match the given constraints >= 4.41.0, ~> 4.59.0


Background:

I got a working terraform project from a friend, when I tried to run in my environment, I am getting this error.


My development environment is oracle developer instance, which is already packed with terraform.


After copying the terraform project, I am trying to do a terraform init


[root@shivin-dev-sg terraform]# terraform init

Initializing modules...

Downloading registry.terraform.io/oracle-terraform-modules/vcn/oci 3.2.0 for vcn...

- vcn in .terraform/modules/vcn

- vcn.drg_from_vcn_module in .terraform/modules/vcn/modules/drg


Initializing the backend...


Initializing provider plugins...

- Finding hashicorp/kubernetes versions matching "~> 2.4.1"...

- Finding latest version of hashicorp/local...

- Finding hashicorp/oci versions matching ">= 4.41.0, ~> 4.59.0"...

- Installing hashicorp/kubernetes v2.4.1...

- Installed hashicorp/kubernetes v2.4.1 (signed by HashiCorp)

- Installing hashicorp/local v2.1.0...

- Installed hashicorp/local v2.1.0 (signed by HashiCorp)

Error: Failed to query available provider packages

 

Could not retrieve the list of available versions for provider hashicorp/oci: no available releases match the given constraints >= 4.41.0, ~> 4.59.0


[root@shivin-dev-sg terraform]#


What is the issue and how to fix it?


As you can see from the initalizing provider plugins part, the oci plugin version is 4.41.0 but in our provider.tf the version is 4.59.0. This means somewhere in my machine there is a plugin cache. I need to find delete it for fixing this issue.


Steps to solve the issue:


cd /usr/share/terraform/

rm -rf plugins


cd /root

rm -rf .terraform


cd /path-to-your-terraform

rm -rf .terraform.d


Now, do a terraform init, it will works!!

Thursday, January 27, 2022

How to backup and restore Oracle Integration Cloud (OIC)

How to backup and restore Oracle Integration Cloud (OIC)

 Current Environment : 

  • Oracle Integration Instance
  • Standard Edition
  • 5K messages per hour

How to backup OIC Integration.

  1. Login to your OCI cloud account.
  2. Select "Developer Service" --> "Application Integration" --> "Integration"

    3.    Select your existing OIC instance and click on "Service Console"
    4.    Select "Integrations"
    5.    You could able to see your Integrations endpoints and its configurations.


    6.  Here, in this example, I am taking the backup of "demo" endpoint.
    7.  Mouse over to the "demo" endpoint right side and choose "Actions" --> "Export". 
         It will download the backup in your machine as "DEMO_01.00.00000.iar" file.



How to backup OIC Integration.

  1. Login to your OCI cloud account.
  2. Select "Developer Service" --> "Application Integration" --> "Integration"
  3. Create your new OIC instance.
  4. Select "Integrations"
    
        5. Click on "Import" and upload your previous backup file "DEMO_01.00.00000.iar"
        6. This will restore OIC integration from our older instance to the new instance.

These steps will help to backup and restore Oracle Integration Cloud (OIC).