Installation
Technologies
Eve Wormhole Mapper is written in C# using ASP.NET Core Blazor Server, EF Core, SignalR, and utilizes several third-party components, particularly:
Requirements
Domain
We recommend using a domain name (your.domain.com) with public DNS for easy and consistent access.
Register your app with CCP
Eve-whmapper requires CCP's SSO authentication API to use the ESI API. Register your app at developers.eveonline.com:
- Click the "MANAGE APPLICATIONS" button.
- Click the "CREATE NEW APPLICATION" button.
- Choose a name for your installation (e.g., prod eve-whmapper).
- Enter a description for this installation (e.g., Eve Wormhole Mapper on production).
- Change "CONNECTION TYPE" to "Authentication & API Access".
- Add the minimum required "PERMISSIONS" (scopes):
esi-location.read_location.v1
esi-location.read_ship_type.v1
esi-ui.open_window.v1
esi-ui.write_waypoint.v1
esi-search.search_structures.v1
- Set your "CALLBACK URL" (e.g., https://your.domain.com/sso/callback).
- Click the "CREATE APPLICATION" button.
- Copy the Client ID, Secret Key, and Callback URL for use in the next configuration step.
Installation
EVE WHMapper can be installed using Docker or Kubernetes. Choose the installation method that best suits your environment.
- Docker
- Kubernetes
Deploy with Docker & Compose
Deploying the Eve Wormhole Mapper using Docker and Compose is straightforward, especially if you follow these steps for your server and Docker setup.
Server
We recommend using a Linux server with the Debian OS for optimal performance and support. If you prefer to use a different operating system, you will need to write your own init script or manually configure the necessary files (see the list below).
Docker
Before proceeding, ensure Docker is installed on your system. Follow the appropriate instructions for your operating system:
Get Docker-Compose Template
- Navigate to your desired installation location.
- Clone the Eve-Whmapper repository. It is recommended to install in
/opt/
for Linux or a suitable directory for Windows.
Linux
sudo git clone https://github.com/pfh59/eve-whmapper.git
cd eve-whmapper/deploy/docker
Windows
git clone https://github.com/pfh59/eve-whmapper.git
cd eve-whmapper/deploy/docker
Configuration
Configuring Eve-Whmapper is simplified through the initialization script. Run the following script as a sudo or root user on Linux, or as an Administrator on Windows, and follow the on-screen instructions:
Linux
sudo ./init.sh
Windows
./init.ps1
This script automatically:
- Updates all the configurations (docker-compose.yml, haproxy.cfg, nginx.conf) from your response,
- Initializes all Docker containers,
- Creates, adds, and uses a strong certificate to use HTTPS with your domain.
Start and Stop
To manage the Docker containers, use the provided scripts:
Linux
- To Start all containers: Use the start.sh script as a sudo or root user.
sudo ./start.sh
- To Stop all containers: Use the stop.sh script as a sudo or root user.
sudo ./stop.sh
Windows
- To Start all containers: Use the start.ps1 script as an Administrator.
./start.ps1
- To Stop all containers: Use the stop.ps1 script as an Administrator.
./stop.ps1
Deploy on kubernate
This section details the deployment process of the application on a Kubernetes cluster. The configuration described here was tested on a Raspberry Pi cluster.
Kubernetes Setup
Install k3s
To install k3s, run the following commands:
apt update
curl -sfL https://get.k3s.io | sh -
Retrieve Node Token
To get the node token, execute:
cat /var/lib/rancher/k3s/server/node-token`
Install Ingress
Apply the Ingress controller:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.5/deploy/static/provider/cloud/deploy.yaml
Install Cert Manager
Deploy the Cert Manager:
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.3/cert-manager.yaml
-
Troubleshooting Certificates:
- List all certificates:
sudo kubectl get ClusterIssuers,Certificates,CertificateRequests,Orders,Challenges --all-namespaces
- Check details of a specific certificate request (e.g., eve-mapper):
sudo kubectl describe certificaterequest tls-evemapper-1 -n evemapper
Install Portainer (optional)
To install Portainer, execute:
kubectl apply -n portainer -f https://raw.githubusercontent.com/portainer/k8s/master/deploy/manifests/portainer/portainer.yaml
kubectl apply -f https://downloads.portainer.io/ce2-19/portainer-agent-k8s-lb.yaml
Configuration
The configuration is divided across multiple files.
Configure Environment Variables
All service use a same ConfigMap with in deploys/envs.yaml [ConfigMap]:
DOMAIN
: your domain (ex: map.mycorp.com)POSTGRES_DB
: your db namePOSTGRESQL_USERNAME
: your db userPOSTGRESQL_PASSWORD
: your db passwordPOSTGRESQL_DATABASE
: same as POSTGRES_DBEveSSO__ClientId
: your client ID given from CCPEveSSO__Secret
: your secret key given from CCPConnectionStrings__DatabaseConnection
:server=<cluster-local-ip>;port=31252;database=<same as POSTGRES_DB>;User Id=<same as POSTGRESQL_USERNAME>;Password=<same as POSTGRESQL_PASSWORD>
ConnectionStrings__RedisConnection
:<cluster-local-ip>:31253
Remarks:
- cluster-local-ip refers to the local IP of the master node in your network. Typically, this is not an internet-facing IP. For instance, it could be 192.168.1.50 (master node).
- Sensitive values are stored as Secrets and must be base64 encoded.
Configure Certificates
Environment values aren't directly usable in deployment files. Modify these manually in relevant configuration files.
In deploys/base.yaml [Certificate-issuer]:
email
: Provide a valid email to receive notifications regarding certificate expiry.
In deploys/base.yaml [Certificate]:
commonName
: Set it to your subdomain (should match DOMAIN in environment variables).
ex:
commonName: map.mycorp.com
dnsNames
: List all DNS names you'll use, including commonName.
ex:
- map.mycorp.com
- mappper.mycorp.com
Configure Ingress
In deploys/ingress.yaml [evemapper-ingress]: replace [your SUB/DOMAIN] with your actual subdomain.
Deployment
Deploy all configurations located in the deploys directory simultaneously:
kubectl apply -f deploys
Note: You might need to run the deployment twice, as some services require the namespace to be created before initialization.
- First run result:
namespace/evemapper created
issuer.cert-manager.io/letsencrypt-evemapper created
certificate.cert-manager.io/tls-evemapper created
configmap/evemapper-config-map created
secret/evemapper-secrets created
deployment.apps/evemapper-app created
service/evemapper-app-service created
ingress.networking.k8s.io/evemapper-ingress created
Error from server (NotFound): namespaces "evemapper" not found
- Second run result:
deployment.apps/postgres created
service/postgres-cluster-ip-service created
deployment.apps/redis created
service/redis-cluster-ip-service created
namespace/evemapper unchanged
issuer.cert-manager.io/letsencrypt-evemapper unchanged
certificate.cert-manager.io/tls-evemapper unchanged
configmap/evemapper-config-map unchanged
secret/evemapper-secrets unchanged
deployment.apps/evemapper-app unchanged
service/evemapper-app-service unchanged
ingress.networking.k8s.io/evemapper-ingress unchanged
Update Application & Restart
To redeploy the application, use:
kubectl rollout restart deployment evemapper-app -n evemapper`
This document is structured to provide clear, sequential instructions for deploying your application on a Kubernetes cluster, especially tailored to the Raspberry Pi setup. Let me know if there are other adjustments or additions you'd like!
Problems?
If you encounter any issues or need assistance, please ask for help on our GitHub repository.