Commit 39c4da8b authored by pfandzelter's avatar pfandzelter
Browse files

Update GitLab Instance

parent 76c26d1f
image: gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/ci:latest
image: git.tu-berlin.de:5000/mcc-fred/fred/ci:latest
cache:
paths:
......@@ -68,8 +68,8 @@ container:
- if [ "$CI_COMMIT_REF_NAME" == "master" ]; then CONTAINER_TAG=latest; fi;
- echo $CONTAINER_TAG
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker tag gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:$CONTAINER_TAG
- docker push gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:$CONTAINER_TAG
- docker tag git.tu-berlin.de:5000/mcc-fred/fred/fred git.tu-berlin.de:5000/mcc-fred/fred/fred:$CONTAINER_TAG
- docker push git.tu-berlin.de:5000/mcc-fred/fred/fred:$CONTAINER_TAG
# this adds a new stage to the CI process that tests the terraform files
#terraform:
......
......@@ -7,7 +7,7 @@
<option name="command" value="" />
<option name="containerName" value="ci" />
<option name="entrypoint" value="" />
<option name="imageTag" value="gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/ci" />
<option name="imageTag" value="git.tu-berlin.de:5000/mcc-fred/fred/ci" />
<option name="commandLineOptions" value="" />
<option name="sourceFilePath" value="ci/Dockerfile" />
</settings>
......
......@@ -7,7 +7,7 @@
<option name="command" value="" />
<option name="containerName" value="fred" />
<option name="entrypoint" value="" />
<option name="imageTag" value="gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred" />
<option name="imageTag" value="git.tu-berlin.de:5000/mcc-fred/fred/fred" />
<option name="commandLineOptions" value="" />
<option name="sourceFilePath" value="Dockerfile" />
</settings>
......
......@@ -40,7 +40,7 @@ clean: ## Remove previous build
@rm -f $(PROJECT_NAME)
container: ## Create a Docker container
@docker build . -t gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred
@docker build . -t git.tu-berlin.de:5000/mcc-fred/fred/fred
staticcheck: ## Do a static code check
@GO111MODULE=off go get -u honnef.co/go/tools/cmd/staticcheck
......
# FReD
# FReD
[![pipeline status](https://gitlab.tubit.tu-berlin.de/mcc-fred/fred/badges/master/pipeline.svg)](https://gitlab.tubit.tu-berlin.de/mcc-fred/fred/commits/master)
[![coverage report](https://gitlab.tubit.tu-berlin.de/mcc-fred/fred/badges/master/coverage.svg)](https://gitlab.tubit.tu-berlin.de/mcc-fred/fred/commits/master)
[![pipeline status](https://git.tu-berlin.de/mcc-fred/fred/badges/master/pipeline.svg)](https://git.tu-berlin.de/mcc-fred/fred/-/commits/master)
[![coverage report](https://git.tu-berlin.de/mcc-fred/fred/badges/master/coverage.svg)](https://git.tu-berlin.de/mcc-fred/fred/-/commits/master)
[![License MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://img.shields.io/badge/License-MIT-brightgreen.svg)
## Setup
For development, it is recommended to install [Goland](https://www.jetbrains.com/go/).
For development, it is recommended to install [GoLand](https://www.jetbrains.com/go/).
It is probably easiest to use the dockerfiles to run Fred. An example setup can be found in `tests/3NodeTest`
......@@ -62,7 +62,7 @@ AWS_PAGER="" aws dynamodb delete-table --table-name fred
- To write a new client a language binding from the proto file (`proto/client/client.proto`) needs to be created. The two tests (in `tests/`) use Go and Python and can be used as inspiration.
- FReD requires the use of certificates to check whether a node has access to a specific keygroup or not.
If access control is not necessary every node can just use the same certificate => they all have access to all the data. (The nodes in the 3NodeTest all use the same certificates, for example)
If access control is not necessary every node can just use the same certificate => they all have access to all the data. (The nodes in the 3NodeTest all use the same certificates, for example)
# Caching in Nameservice
......
......@@ -28,42 +28,42 @@ ENV DOCKER_CHANNEL stable
ENV DOCKER_VERSION 19.03.5
RUN set -eux; \
\
apkArch="$(arch)"; \
case "$apkArch" in \
# amd64
x86_64) dockerArch='x86_64' ;; \
# arm32v6
armhf) dockerArch='armel' ;; \
# arm32v7
armv7) dockerArch='armhf' ;; \
# arm64v8
aarch64) dockerArch='aarch64' ;; \
*) echo >&2 "error: unsupported architecture ($apkArch)"; exit 1 ;;\
esac; \
\
if ! wget -O docker.tgz "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${dockerArch}/docker-${DOCKER_VERSION}.tgz"; then \
echo >&2 "error: failed to download 'docker-${DOCKER_VERSION}' from '${DOCKER_CHANNEL}' for '${dockerArch}'"; \
exit 1; \
fi; \
\
tar xzvf docker.tgz --strip=1 -C /usr/local/bin docker/docker; \
rm docker.tgz; \
\
docker --version
\
apkArch="$(arch)"; \
case "$apkArch" in \
# amd64
x86_64) dockerArch='x86_64' ;; \
# arm32v6
armhf) dockerArch='armel' ;; \
# arm32v7
armv7) dockerArch='armhf' ;; \
# arm64v8
aarch64) dockerArch='aarch64' ;; \
*) echo >&2 "error: unsupported architecture ($apkArch)"; exit 1 ;;\
esac; \
\
if ! wget -O docker.tgz "https://download.docker.com/linux/static/${DOCKER_CHANNEL}/${dockerArch}/docker-${DOCKER_VERSION}.tgz"; then \
echo >&2 "error: failed to download 'docker-${DOCKER_VERSION}' from '${DOCKER_CHANNEL}' for '${dockerArch}'"; \
exit 1; \
fi; \
\
tar xzvf docker.tgz --strip=1 -C /usr/local/bin docker/docker; \
rm docker.tgz; \
\
docker --version
# Install terraform
ENV TERRAFORM_VER 0.12.9
# # Install terraform
# ENV TERRAFORM_VER 0.12.9
RUN wget -O terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VER}/terraform_${TERRAFORM_VER}_linux_amd64.zip"
# RUN wget -O terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VER}/terraform_${TERRAFORM_VER}_linux_amd64.zip"
RUN apt-get update && apt-get install -y --no-install-recommends \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# RUN apt-get update && apt-get install -y --no-install-recommends \
# unzip \
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN unzip terraform.zip
RUN mv terraform /usr/local/bin/
# RUN unzip terraform.zip
# RUN mv terraform /usr/local/bin/
# Install Docker Compose
RUN curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
......
......@@ -7,11 +7,11 @@ echo "$2" > ./gitlabtoken
sudo systemctl start docker
sudo cat ./gitlabtoken | sudo docker login -u="$1" --password-stdin gitlab-registry.tubit.tu-berlin.de
sudo cat ./gitlabtoken | sudo docker login -u="$1" --password-stdin git.tu-berlin.de:5000
sudo rm gitlabtoken
sudo docker pull gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:"$3"
sudo docker pull git.tu-berlin.de:5000/mcc-fred/fred/fred:"$3"
sudo docker run -it \
--name=fred \
......@@ -21,4 +21,4 @@ sudo docker run -it \
-p 80:80 \
-p 5555:5555 \
-v /tmp/config.toml:/config.toml \
gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:"$3" --config config.toml --ws-host "$4" "$5"
\ No newline at end of file
git.tu-berlin.de:5000/mcc-fred/fred/fred:"$3" --config config.toml --ws-host "$4" "$5"
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment