Sie sind auf Seite 1von 6

DevOps Technical Test

Test Time 10 Questions in 60 Min


Required equipment: Pen & Paper, No internet-accessible device is allowed to be used.
Answers should be given in English.
1) You have an application which when running is failing to open /usr/lib64/php/5.6/modules/imagick.so.
The file is not present, assuming the system is running AWS Linux / Centos how would you determine
which package you would need to install that contains this file? Then how would you install this package?

2) You have a web site which is being aggressively spidered by a number of systems given the site apache
access log is in /var/logs/httpd and in the following format

62.210.215.117 - - [20/Aug/2019:15:26:14 +0100] "GET /feed/ HTTP/1.1" 301 - "-" "Mozilla/5.0 (X11; L
inux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36"
54.198.100.173 - - [20/Aug/2019:15:37:40 +0100] "GET /whmcs/announcementsrss.php HTTP/1.1" 200
27936 "-" "curl"
188.165.192.220 - - [20/Aug/2019:15:40:12 +0100] "GET / HTTP/1.1" 301 - "-" "Mozilla/5.0 (Windows
NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36"

How would you produce a list of the top 20 IP addresses requesting pages from the site?
3) Given the following .htaccess file why would the redirect to https not work?

RewriteCond %{REQUEST_FILENAME} !-f


RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php [L]

# 301s for languages


Redirect 301 /cn/ /?lang=zh
Redirect 301 /en/ /?lang=en-US

IndexIgnore *
Options -Indexes

RewriteCond %{HTTP:X-Forwarded-Proto} !^$


RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]

RewriteCond %{HTTPS} off


RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

4) Given an AWS Linux Apache server where the configuration root is /etc/httpd. You are trying to find the
configuration for a vhost which directories and files would you check to find the configuration?
5) Given the following puppet heira data extract, how would you add an additional site URL
www.bigbankuniversity.com to access the site under the webroot /var/web/eic?

www.bigbankearlyincareer.co.uk:
serveraliases:
- 'bigbankukgraduates.com'
docroot: '/var/web/eic'
directories:
- path: '/var/web/eic'
allow_override:
- 'All'
www.bigbankjobsredeployment.co.uk:
serveraliases:
- 'bigbankjobsredeployment.co.uk'
docroot: '/var/web/redep'
directories:
- path: '/var/web/redep'
allow_override:
- 'All'

6) A system is being reported as unresponsive by the client, on examination you find that the Amazon
instance system status check is failing. What action should you undertake to remedy this situation?
7) Can you explain simply what actions the following CloudFromation Template does?

AWSTemplateFormatVersion: 2010-09-09
Parameters:
ELBarn:
Type : String
Description: xxxxx
CertArn:
Type : String
Description: xxxxxxxxxxx
DefaultTargetARN:
Type : String
Description: xxxxxxxxx
Resources:
HttpListener:
Type : AWS::ElasticLoadBalancingV2::Listener
DeletionPolicy: "Retain"
Properties :
DefaultActions:
- Type : redirect
Protocol : HTTPS
Port : 443
StatusCode: HTTP_301
LoadBalancerArn: !Ref ELBarn
Port : 80
Protocol : HTTP
HttpsListener:
Type : AWS::ElasticLoadBalancingV2::Listener
DeletionPolicy: "Retain"
Properties :
DefaultActions:
- Type: forward
TargetGroupArn: !Ref DefaultTargetARN
LoadBalancerArn: !Ref ELBarn
Port : 443
Protocol : HTTPS
SslPolicy : ELBSecurityPolicy-TLS-1-2-Ext-2018-06
Certificates :
- CertificateArn: !Ref CertArn
Outputs:
HttpsListenerARN:
Description: Https Listener ARN
Value: !Ref HttpsListener
8) An application written in PHP 7.1 is failing while uploading certain files, how would you check what the
issue is and what parameters would you change to resolve the issue.

9) You have a server cluster behind a load balancer running an application, users are reporting being
randomly logged out of the system, what is a possible cause of this?

10) You have a MySQL database that is consuming an excessive amount of CPU, how would you diagnose this
issue. And given the query information below how would improve this?

Query_time: 6.423373 Lock_time: 0.000036 Rows_sent: 696 Rows_examined: 274647


SET timestamp=1546459213;
SELECT
*
FROM
baskets
WHERE
ttv_start <= NOW()
AND ttv_end IS NULL
AND id = 804263;

Das könnte Ihnen auch gefallen