diff options
Diffstat (limited to 'notes')
-rw-r--r-- | notes/design.pdf | bin | 0 -> 31680 bytes | |||
-rw-r--r-- | notes/design.tex | 38 | ||||
-rw-r--r-- | notes/design.toc | 4 |
3 files changed, 35 insertions, 7 deletions
diff --git a/notes/design.pdf b/notes/design.pdf Binary files differnew file mode 100644 index 0000000..3da2c28 --- /dev/null +++ b/notes/design.pdf 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} diff --git a/notes/design.toc b/notes/design.toc new file mode 100644 index 0000000..80e9943 --- /dev/null +++ b/notes/design.toc @@ -0,0 +1,4 @@ +\contentsline {section}{\numberline {1}Initial design}{1}% +\contentsline {section}{\numberline {2}Cluster}{1}% +\contentsline {section}{\numberline {3}Kubeconfig}{1}% +\contentsline {section}{\numberline {4}Creating a basic service}{2}% |