Oracle Cloud Infrastructure Architect Associate exam tests varieties of topics like
- Identity and Access Management
- Networking
- Compute
- Storage
- Database
Oracle Cloud Infrastructure Architect Associate exam tests varieties of topics like
Ubuntu is one of the most popular free Operating System and it contains lots of packages which makes it ideal for day to day operation.
If we want to have ubuntu alongside the windows OS then we can follow these steps
https://www.businessinsider.com/how-to-partition-a-hard-drive-in-windows-10
https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview
https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview
It is the time where the whole world is facing a challenge against the Covid-19 virus and almost all countries went into the lockdown period from the beginning of 2020 and gradually unlock started. As we all know that unlock is for the economy to boost and not that we are free of Covid-19. As a citizen, we all have followed the lockdown restriction imposed by the government by staying at the home and avoiding any unnecessary travel including travel to a destination, exploration, visiting public places etc.,
Humans are a social animal and it is very difficult to lock ourselves from the outside world for a very long time without any recreation. At the same time, we should behave responsibly during the unlock period by following the social distancing, wearing a mask, cleaning the hands often etc. With this in mind, we planned for a very short day trip to Tharangambadi as we heard this beach will be less crowded than its counterpart Karaikal beach.
The history dates back to 17th century when Danish came to India for trading, they built a fort for housing governers, merchants etc. To date, the fort is maintained very well and today it contains lots of old artifacts. It has a good beach with a park, restaurants nearby.
We started from Kumbakonam and we wanted to enjoy the journey itself and not just the beach in Tharangambadi. There are multiple different directions to reach the place from Kumbakonam but we chose the direction via Aduthurai - Porayar Rd https://goo.gl/maps/d3pcog4kqX5PxdEw9 . The nice thing about the road is that 45 km out of 58 km will be road next to the riverbank making the journey more pleasant and joyful. To our advantage this year the Cauvery catchment had huge rainfall and all the dams were overflowing and all through our journey we were seeing the full flow of water and kids were playing in the group along the side of steps in the riverbank.
![]() |
Behind is the river |
![]() |
In the beach |
![]() |
Fort |
Adding additional tags to the image will be a common process in the CICD world, the additional tags would be something like the build number, test result, etc.,
When adding multiple tags it will be very heavy if we are doing the tagging locally and then pushing the tagged image to the server. So instead of doing like that, we can use the docker HTTP REST API which will be lighting fast tagging and will add the tag to the remote docker repository
Below is the example of tagging an image in a remote repository using python
def addAssociatedTag(imageName, tag, associatedTag, bearerToken): header = {'Authorization': ''} header['Authorization'] = 'Bearer ' + bearerToken header['Accept'] = 'application/vnd.docker.distribution.manifest.v2+json' res = requests.get( url="https://docker.io/v2/" + imageName + "/manifests/" + tag, headers=header) print('Retrieved the metifests status is ' + str(res.status_code)) # Add the associated tag by passing the same manifests header['Accept'] = '*' res = requests.request( "PUT", url="https://docker.io/v2/" + imageName + "/manifests/" + associatedTag, headers=header, data=res.content) response_status = res.status_code print('Adding associated tag for ' + imageName + ':' + tag + ' with ' + imageName + ':' + associatedTag + ' is = ' + str(response_status)) return response_status
In the above, the setting the 'Accept' header is very important while getting the manifests. If we do not set it to 'application/vnd.docker.distribution.manifest.v2+json'then we will have the default 'application/json' which will not be correct when we use the content for adding the associated tags and we will get below error
{
"errors": [
{
"code": "MANIFEST_LAYER_UNKNOWN",
"message": "blob unknown to registry",
"detail": {
"digest": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
}
}
]
}
Details about other docker REST APIs are in https://github.com/venkatesh-mohanram/continuous-learning/blob/master/docker/httpapiv2.md
Most of the time when it comes to docker, we play with using the CLI with 'docker' command. If we want to pull an image, tag an image, push an image we do all that with CLI only. However, apart from CLI, the docker repository supports varieties of REST API to do plenty of things and here I am planning to cover a few things like below
The manifest rest resource can be used in a way how we want, for eg: if we want to know whether the image exists with a given tag then we can use the GET method of it
def checkAlreadyPresent(imageName, tag, bearerToken):
auth_header = {'Authorization': ''}
auth_header['Authorization'] = 'Bearer ' + bearerToken
res = requests.get(
url="https://docker.io/v2/" + imageName + "/manifests/" + tag,
headers=auth_header)
return res.status_code
You can also refer to
https://github.com/venkatesh-mohanram/continuous-learning/blob/master/docker/httpapiv2.md
Maven is one of the very good build tools and is still popular among many users. Even though we use it for a long time, we use to remember or use only a limited number of its commands like 'mvn clean install', 'mvn package', mvn test' etc
we get to know many of its commands only when we face issues, one of the nice command is the 'mvn dependency:tree' to get all the dependencies including the transitive dependencies we have. In this blog, I am going to talk about this particular command
We should execute the below command from the folder where we have the pom.xml file
$ mvn dependency:tree
This will print all the dependencies from the root till the last jar, this will help to identify what are the transitive dependencies that we have.
We have varieties of options to fix the transitive deps error,
1. Add the transitive dependency into <exclusions> list
If you have control over the dependency then you can do one of the following
2. make the transitive deps in the provided scope https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope
kubectl create secret generic db-user-pass
--from-file=./cwallet.sso
--from-file=./ewallet.p12
--from-file=./keystore.jks
--from-file=./ojdbc.properties
--from-file=./sqlnet.ora
--from-file=./tnsnames.ora
--from-file=./truststore.jks
apiVersion: v1
kind: Deployment
metadata:
name: addition-svc-deployment
labels:
name: addition-svc
spec:
volumes:
- name: secret-volume
secret:
secretName: db-user-pass
containers:
- name: addition-svc-container
image: addition-svc:latest
volumeMounts:
- name: secret-volume
readOnly: true
mountPath: "/etc/secret/atp-wallet"