Deutsche Bank Interview Experience
Date: 22nd April, 23rd April 2022
Gave the interview for Associate position of DB India through a referral from a college friend.
Round-1
Intro
About docker — functionalities , created dockerfile?-> Yes, used keywords — CMDS, ARGS, ENTRYPOINT, RUN. Lets say you have dependencies, how to manage that?-> I created requirements.txt file and will call CMD
“pip install -r requrements.txt”
What all I have used in aws- ec2, vpc, eks clusters, subnets. Using boto3 module for was instance provisioning, company uses terraform to create clusters, I haven’t got the use case.
Why helm is used?-> to provision multiple resources like service accounts, pods (different pods, frontend and backend), services, all creation with single provisioning for charts. I have worked in Nokia software whose deployment was based on helm.
Liveness and readiness probes-> Liveness probes to see if container is ok, readiness probe -to check if container is ready to accept traffic. How will you check this? -> Using kubectl logs, kubectl describe cmd -> usecase where I had server cpu and memory choked up, cleaned all LCs , LCs are linked clones which we created in VMware cloud
Jenkins usecase- where there is sanity script, I will setup a cron, for other use cases-call shell script whenever needed from jenkins job
Difference between deployment and delivery- answered in delivery the manual step of testing is done, while in deployment whole code is automatedly built , tested and deployed
CI vs CD — Answered using the usecase — CI- we push in all code changes, create an image and push it to repo. CD — after all changes pushed, and thoroughly tested by QA, pull and deploy to all hosts
Use case where I have created python script- created dockerfile, created shell script where I use docker build, tag, push command, out it in ansible server, creating jenkins job from where we can trigger job and put that script in git
What is maven-> build tool for creating repositories, done it on internship but haven’t worked on java much in industry
Scenario- we got a response in form of json, how to parse that? Convert it to dict, and then check responses based on key-value and then check for exceptions, use time.sleep(30) , create a flag, next time if flag is ok , don’t commit, create exceptions based on certain use cases, or create custom exceptions
Concepts on git commands, git add, commit, push, stash, reset, log. Will git revert work if commit already pushed->no. lets say we have 10 commits, which git strategy do we use? Strategy???->we will raise a PR , this PR could be of single commit or multiple commits as well.
What if we want to revert our change and already 10 commits are done ahead of our commit?-> No idea, revert won’t work that’s for sure. Have you heard abt git rebase? No sir , never scenario occurred
Cleared this round
Round-2 — This was some hard round with director and VP
What are some stages in pipeline? How will do design a pipeline?
Have you developed any pipeline? -> no, I haven’t developed pipeline but I developed jenkins job. You create 3,4 jobs and then you can put them one after the another, and that’s how pipeline is created.
How will you design it? I need the steps/stages of pipeline design?-> I answered — Build-> Test -> Deploy
Steps I will follow -> git (Trigger a job PR)-> Maven , ANT (If needed, to built dependencies) ->Dockerfile -> Deploy an image -> Push a repository (ecr was, docker hub)-> Manual testing/Automation testing
Wont the jenkins slaves be choked if developers continue waiting for tests and pipelines aren’t approved? -> Yes, in that case we can split the pipeline in 2 jobs unless it gets automated. Second job 2. Automation step testing (fail) -> (Flag)-> else if pass-> Hosts will pull image
Lets say the servers are passed, and it fails on prod??
For that I can deploy first in dev, stage env where traffic is not getting served to prod, and if ok, then proceed to prod, lets say I split like 15 servers (Prod) , 3 server stage, this is called integration testing, if tests fail in integration testing, then will try to trace that defect.
FACT: If the testing is manual then will add a flag where the pipeline halts and asks from person to go ahead, this is called Continuous delivery. Else if the pipeline is automated, then it is called Continuous Deployment if pipeline is automated end-to-end.
go for 2 pipelines so that jenkins slave server is not getting impacted.
3. What if we get to know there is some vulnerability in patch or update? There was a log4j vulnerability? Have you heard about it? Can you explain? How will you trace that?
Sir I will try to trace if vulnerability is there in specific version, if yes, then I will downgrade version.
Other than that how will you know? (Clueless, since there are situational type questions not found in books :p , if you have faced it then you can explain, therefore its preferable to learn as much we can)
Lets suppose there is a scenario where developers are overriding the existing image version, unknowingly that that version already exist, how will you make sure it doesn’t happen? Again haven’t faced scenario, my guess is that I will maintain a Database for the specific versions/tags that are being pushed, in case there is a conflict, db will point out, again a guess of approach. In our company, we create JIRA tickets, and developers areaway of tag number.
What is branching? Do you know about concepts in branching? (I interrupted, in between, I have this tendency to get super excited whenever there is a healthy discussions going on, please avoid that)->Yes sir I do, each developer can push the code in dev/stage branch for each microservice and test it from there, and one approach could be that testing goes in this branch, if it passes, then PR gets merged to master branch. And we can have a trigger, cron set in jenkins job that in case it is set.
Cron is set to which trigger point? Sir, main branch. Is it dev or master or both? No only in master branch, developer make sure that it after testing , code gets merged in master branch only.
One more question was related to credentials, how you setup? I said, there are user specific credentials, and one organisation credentials as well. Whenever we do ssh, we do it via org credentials. At present 150 people have user credentials to login to that server
Some questions related to versioning and tagging
How will you write test suites? Have you used any test suite?-> No test suit used, I think he was expecting frameworks like TestNG, I said I would use selenium for testing.
Will you create dockerfile? Won’t you require any building modules? Here I got bit confused because I haven’t worked on Maven, ANT, java projects. I said in case the dependencies are built in a manner that images can be created, then I can skip DOCKERFILE creation step. This is wrong, got to know that afterwards, for image building Dockerfile has to be created, that’s it, we can’t ignore dockerfile build.
How will you create dockerfile? (What is meant by how will you build) I said using variables ENV, WORKDIR, ARGS, CMD (this question I couldn’t understand)
Then some questions on python, how will you remove duplicates?
I said 2 approaches , one using the set, and second using the dict to check the frequency of each string and if that is same, discard it other time? I assumed string like this
I/P arr= [‘I’,’a’,’I’]
O/P arr = [i,a]
(I assume by string they mean what they could have asked is like this rajivisinterviewingrajiv and remove last rajiv, don’t know)
My O/P
either use buildin set or frequency based ‘for’ loop
dict = {}
For loop//
dict[element] =0
dict[element] +1
Count // if freq > 1:
Another question asked was about this pattern, how to print?
XXX0
XX12
X345
6789
I gave loop based pseudo solution, how many loops? -> I said 2 loops, one for the row and other for column?
for i in count:
for j in count:
print()
What if I gave row count as 3? How will be the O/P? -> I showed,
XX0
X12
345
How would you assume that row count and column count is same? Ok, lets move on
At this time, I could sense he was feeling restless
Difference between container and vm? I told container are lightweight and have only that much dependencies that are needed for application, what would you prefer?->Docker always, why? I explained theory and typed like this content, Please find the conclusions :p
scale, dependencies,
app dedicated resources
VM 1cpu
app app app
VM VM VM VM
images
container (consumer on-demand), VM (dedicated)
container — size in MBs, VM size in GBs
// resource less (only, extra addon) time, cost
app
What if I enable an autoscaler? VMs also gets spinned up, then why docker? (I paused) obvious answer could be because they are light weight and consume resources on demand, even if vm is there it will add on thousand other modules or dependencies which aren’t needed for the purpose of that specific app, but for the docker it’s not an issue. (This was the obvious answer as per me, containers are fast, scalable, light weight, ready to be deployed , and vm takes time resources. I knew concept about LXC containers as well but this didn’t strike me, I can imagine what answer they were expecting)
I also explained about Type-1 and Type-2 hypervisors?
Type1 OS Kernel-> Hypervisor (KVM, 1 OS)-> Docker images
Type2 Kernel-> Host OS -> Virtualisation/Docker -> Guest OS
What will you prefer? -> Type 1 only but it depends upon business usecase. You are contradicting your own statement, I tried explaining how in Nokia we use openstack and there director node we create and on top of that overcloud….(he wasn’t interested, so I paused)
I will prefer type-1 because 1 OS layer is less. (Again 1 mistake I made- you see in diagram I gave something like this Virtualisation/Docker-> this is not true, docker images are build on top of virtualisation)
What role you are expecting, writing groovy scripts, developing pipelines, jenkins jobs, GCP or python developer? I said, role 1
OK , I am done, VP said
Director asked me do I know about kubernetes? I said yes, he asked me what is a container? Its an abstraction of docker image which takes up the resources from kernel and then fire up the applications? What are pods? Its again an abstraction layer which has containers or a group of containers only
Verdict: Rejected
The point is sometimes interviews are grilly, I was good in concepts but answers weren’t polished and I flunked. Again if I would rate, I would say that its ok if me/candidate is making mistakes, if he is willing to improve. We can’t know 100% things, there should be some room of learning, or else whats the fun if we can’t learn. In most interviews in India, I see people expecting full fledged tiptop answers on that particular topics. My takeaway is that my approach in every case was something to do, not the perfect one. I felt I am not 100% but I know aws, python and kubernetes simultaneously along with linux and pipeline (concepts), so ideally I was a right fit.
But what I believe doesn’t matter 😜, world doesn’t work the way we think