Skip to content

Latest commit

 

History

History
110 lines (88 loc) · 2.23 KB

install.md

File metadata and controls

110 lines (88 loc) · 2.23 KB

Installation methods

Download binary

See README.md.

From source

Assuming you have a recent Rust toolchain, a C++ compiler, strip, and make installed:

git clone --recursive https://github.com/lichess-org/fishnet.git
cd fishnet
RUSTFLAGS="-C target-cpu=native" cargo run --release -vv --

To update, do not forget git submodule update before building again:

git pull
git submodule update
RUSTFLAGS="-C target-cpu=native" cargo run --release -vv --

Docker

docker run -it --name fishnet -e KEY=abcdef niklasf/fishnet:2

Per default, runs with n-1 cores, alternatively, specify the number of cores to use with:

docker run -it --name fishnet -e KEY=abcdef -e CORES=n niklasf/fishnet:2

For the full list of configurable environment variables, see docker-entrypoint.sh.

To update, since we named the image fishnet:

docker rm fishnet
docker pull niklasf/fishnet:2
docker run -it --name fishnet -e KEY=abcdef niklasf/fishnet:2

Kubernetes

Create fishnet.yaml as follows and edit fishnet-private-key:

apiVersion: v1
kind: Namespace
metadata:
  name: fishnet
---
apiVersion: v1
kind: Pod
metadata:
  name: fishnet-pod
  namespace: fishnet
spec:
  containers:
    - name: fishnet-pod
      image: niklasf/fishnet:2
      imagePullPolicy: Always
      env:
        # - name: CORES
        #   valueFrom:
        #     configMapKeyRef:
        #       name: fishnet-config
        #       key: cores
        - name: KEY
          valueFrom:
            secretKeyRef:
              name: lichess
              key: fishnet-private-key
  restartPolicy: Always
---
apiVersion: v1
kind: Secret
metadata:
  name: lichess
  namespace: fishnet
data:
  fishnet-private-key: <UPDATE here with your fishnet private key as BASE64 encoded string>
# ---
# apiVersion: v1
# kind: ConfigMap
# metadata:
#   name: fishnet-config
#   namespace: fishnet
# data:
#   cores: "4"

Uncomment the configMap to change the number of cores used.

To view logs:

kubectl logs fishnet-pod -n=fishnet

Delete to update, since the image pull policy is set to Always:

kubectl delete pod fishnet-pod -n=fishnet
kubectl apply -f fishnet.yaml