aboutsummaryrefslogtreecommitdiffstats
path: root/notes/design.tex
diff options
context:
space:
mode:
authorSpike <avlampson+git@gmail.com>2019-05-09 16:10:42 +0100
committerSpike <avlampson+git@gmail.com>2019-05-09 16:10:42 +0100
commitce068f67bd79ba8886351b3d9e12b36df3c6e5e2 (patch)
treed83e21612497b2e487ffe325e4f278eb6f4b4e59 /notes/design.tex
parent8907927fab9bf122bd4f5ad0928abe6b9faec449 (diff)
downloadsensyne_demo-ce068f67bd79ba8886351b3d9e12b36df3c6e5e2.zip
sensyne_demo-ce068f67bd79ba8886351b3d9e12b36df3c6e5e2.tar.gz
sensyne_demo-ce068f67bd79ba8886351b3d9e12b36df3c6e5e2.tar.bz2
Adding script to create service, and finishing notes
Diffstat (limited to 'notes/design.tex')
-rw-r--r--notes/design.tex38
1 files changed, 31 insertions, 7 deletions
diff --git a/notes/design.tex b/notes/design.tex
index 6dabfd3..8a93e28 100644
--- a/notes/design.tex
+++ b/notes/design.tex
@@ -1,6 +1,6 @@
\documentclass[a4paper]{article}
-\title{Sensyne Tech Test\\ Notes and explainations}
+\title{Sensyne Tech Test\\ Notes and explanations}
\date{\today}
\author{Spike Lampson}
@@ -8,19 +8,43 @@
\begin{document}
\maketitle
-\toc
+\tableofcontents
\section{Initial design}
-Requirements are: Simple web app, with backend and database, deployed on a cluster of nodes via an orchestration layer. Expectation: Couple of hours, which seems very hopeful for setting up a project at all, let alone finishing it to me. Still, what to do.
+Requirements are: Simple web app, with back-end and database, deployed on a cluster of nodes via an orchestration layer. Expectation: Couple of hours, which seems very hopeful for setting up a project at all, let alone finishing it to me. Still, what to do.
-Initial plan: Create in terraform/AWS. Find basic docker webapp container, deploy that onto EKS, with RDS instance as the backend.
+Initial plan: Create in terraform/AWS. Find basic docker webapp container, deploy that onto EKS, with RDS instance as the back-end.
Things to check:
\begin{enumerate}
-\item How much VPC/IG/routing etc still needs to be done by hand
-\item Does EKS handle the loadbalancer?
-\item Find basic docker container
+ \item How much VPC/IG/routing etc still needs to be done by hand (turns out, quite a lot)
+ \item Does EKS handle the load balancer? (Yes, delightfully)
+ \item Find basic docker container (Managed to use kubernetes example)
\end{enumerate}
+\section{Cluster}
+Cluster based on https://learn.hashicorp.com/terraform/aws/eks-intro, with minor tweaks.
+
+\section{Kubeconfig}
+
+To create the kubectl config, run \texttt{terraform output kubeconfig > ~/.kube/config}.
+
+To create the config map, run \texttt{terraform output config\_map\_aws\_auth > config\_map\_aws\_auth.yaml} followed by \texttt{kubectl apply -f config\_map\_aws\_auth.yaml}.
+
+This relies on \texttt{aws-iam-authenticator}, which is installed via https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html
+
+\section{Creating a basic service}
+
+Unashamedly copied from step 4 of https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html
+
+\begin{verbatim}
+./guestbook.sh
+\end{verbatim}
+
+This will create a basic guestbook service via kubectl, with a Redis back-end. Sadly, it appears that the guide is out of date, as the docker container for the redis-slave services (\texttt{kubernetes/redis-slave:v2}) appears to not be working today. Still, the service starts, and displays a nice error message, and the failure in the pods can be seen with \texttt{kubectl get pods} and \texttt{kubectl describe pods redis-slave}.
+
+I have chosen not to use a separate service for redis, or another database, due to having spent some time on this already. This doesn't really fulfill the requirements as I initially read them, but I can make the argument that the redis datastore counts as a database store, without needing to be another service such as RDS.
+
+\end{document}