Appendix B
Steps for extracting Deb package
#Steps for extracting the deb packages: sudo apt install binutils ar x <filename> #The extracted folders will be debian-binary, control.tar.gz and data.tar.xz #The binary is available in the archive data.tar.xz tar xf data.tar.xz #The extracted folders are etc and usr.The binary is in usr/bin.
Command to Build Docker file
#Command to build docker file docker build -t <dockerhub username>/mongodb-sharded -f Dockerfile . #Example: docker build -t anuphal/mongodb-sharded -f Dockerfile .
Command to push Image to Docker Hub
#Command to push image to docker hub docker push <dockerhub username>/mongodb-sharded:latest #Example: docker push anuphal/mongodb-sharded:latest
Dockerfile for McRouter
# Dockerfile for mcrouter FROM ubuntu:20.04 ENV DEBIAN_FRONTEND noninteractive RUN apt update && apt -y install build-essential libtool ragel libssl-dev pkg-config python3.8 git RUN ln -s /usr/bin/python3.8 /usr/bin/python && \ ln -s /usr/bin/python3.8 /usr/bin/python3 RUN git clone && cd libunwind && \ autoreconf --install && ./configure && make -j && make install RUN git clone && cd fbthrift && \ ./build/fbcode_builder/getdeps.py install-system-deps --recursive fbthrift && \ ./build/fbcode_builder/getdeps.py --allow-system-packages build fbthrift WORKDIR /tmp/fbcode_builder_getdeps-ZfbthriftZbuildZfbcode_builder-root/installed RUN cp -rf fbthrift/lib/*.a /usr/lib/ &&\ cp -rf folly/lib/*.a /usr/lib/ &&\ cp -rf fizz/lib/*.a /usr/lib/ &&\ cp -rf wangle/lib/*.a /usr/lib &&\ cp -rf fmt*/lib/*.a /usr/lib &&\ cp -rf python*/lib/fb-py-libs/python-six/six.py /usr/lib/python3.8/ &&\ cp -rf fbthrift/include/thrift /usr/include/ &&\ cp -rf folly/include/folly /usr/include/ &&\ cp -rf fizz/include/fizz /usr/include/ &&\ cp -rf wangle/include/wangle /usr/include/ &&\ cp -rf fmt*/include/fmt /usr/include/ &&\ cp -rf python*/lib/fb-py-libs/python-six/six.py /usr/lib/python3.8/ &&\ cp -rf fbthrift/include/thrift /usr/include/ &&\ cp -rf folly/include/folly /usr/include/ &&\ cp -rf fizz/include/fizz /usr/include/ &&\ cp -rf wangle/include/wangle /usr/include/ &&\ cp -rf fmt*/include/fmt /usr/include/ &&\ cp -rf fbthrift/bin/thrift1 /usr/bin/ ENV FBTHRIFT_BIN=/usr/bin/ RUN git clone && \ cd mcrouter/mcrouter && \ autoreconf --install && \ ./configure && \ make && make install ENV DEBIAN_FRONTEND newt
The Modifications for Role and User to be done in file “configmap.yaml”
--- # Role and RoleBinding kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: social-network name: pod-access rules: - apiGroups: ["apps"] # "" indicates the core API group resources: ["statefulsets"] verbs: ["get", "watch", "list", "update"] --- kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: read-pods namespace: social-network subjects: - kind: User name: system:serviceaccount:social-network:default - kind: User name: <username>@amperecomputing.com apiGroup: rbac.authorization.k8s.io roleRef: kind: Role name: pod-access apiGroup: rbac.authorization.k8s.io