diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..059b89bb --- /dev/null +++ b/404.html @@ -0,0 +1,1258 @@ + + + +
+ + + + + + + + + + + + + + + +Have a question? Want to say thank you? Need to express your opinion on SeAT? You are welcome to join us on our official Discord Server! https://discord.gg/VcUZRcnMYK.
+ + +Track the conversation on the EVE Online Forums.
+ + + + + + + + +So, you think its time to report an issue. Awesome! However, before you do this, please go through the troubleshooting steps first to identify any common errors that you might be able to to fix yourself.
+In order to best understand the bug, we need as much info as possible about your environment. For that, you can run the following command (from your SeAT directory), and copy / paste the output as part of your bug report:
+ +Log files are a fantastic resource. Check out the Laravel log for any Exception
type errors, and add them to your bug report. The log file is located (relative to where you installed SeAT) at:
Screenshots may also help, so don't be shy to take some and attach them to your bug report! If you flip your installation into debug mode then it may be possible to capture the error that is occurring via a screenshot.
+Finally, to report the bug, head over to Github Issues and click on New Issue.
+ + + + + + + + +SeAT is heavily relaying on EVE Online Single Sign-On to authenticate user. +However, it's also shipped with a built-in administrator user.
+You need an admin account in order to do certain tasks like configuring your instances, roles, squads, etc...
+In order to authenticate with built-in admin user, use command disclosed bellow (choose your context).
+You'll get a link after the command has finished running, which looks similar to the one bellow:
+Copy it and paste it inside your browser, and you will be authenticated as the built-in admin account.
+Hint
+You can define a standard user account as an administrator from the user card. +To do so, go into Settings > Users, search the user which need to be upgraded and clic on the edit button. +On the displaying card, check Administrator and confirm change using edit button.
+Warning
+If you have not configured the APP_URL
setting in the .env
file, then the admin url will be generated for localhost
.
+This is most likely incorrect and you can simply replace localhost
with your server IP address or domain name.
SeAT supports configuring user access control by means of Role-based Access Control (RBAC). +This allows for SeAT administrators to granularly control who has access to what based on which roles a SeAT user has.
+In SeAT, the default rule is to deny access. As a result, someone without a permission will not be able to access the requested resource.
+Tip
+Use roles to define permission without wondering about automation. You will be able to set up role auto assignment with Squads. +The more granular are your roles, the easier they will be to maintain them and built your automation rules.
+This section aims to clear up the definitions used in the SeAT RBAC implementation.
+User
+A SeAT user account. This can be either a user account that was created in SeAT itself, or an automatically created account based on SSO.
+The only difference between the accounts is that with an SSO account, SeAT has no idea what the account's password is.
+Otherwise, everything else is exactly the same.
Scope
+A scope is a domain grouping different permissions related to the same topic. Permissions from certain scope can be limited (ie: character or corporation).
Permission
+A Permission is an attribute that is assigned to a Role. It grants access based on the specific permission.
Role
+A Role is simply a collection of permissions. Users get assigned a roles and inherit the permissions granted by that role.
+A user cannot be given a raw permission. Permissions can only be granted by creating a Role, assigning permissions to the Role and granting the role to a user.
Filters
+Permissions from certain scope can received filters. That simply mean the granted permission is limited to certain conditions.
+As an example, you may want to limit the asset permission from character scope to only a selection of character.
Entity
+An entity is something on which the permission will be applied. It can be a Character, a Corporation or anything else.
To manage roles, you must go into Settings from SeAT sidebar, then choose Access Management.
+Info
+To be able to manage SeAT roles, you must be authenticated as an administrator user. +Administrators can be managed in the users list, located in Settings.
+The Role card is compounds of two main area.
+ +Left pane contains basic information. It allows you to provide a name, a description and upload an optional logo. +Those information can be sync with any third party platform using the API.
+Tip
+Provided logo are stored into database - so you don't need to worry when moving your installation.
+Right pane contains role settings. The pane is split in two tabs - first tab is showing the role permissions definitions. +Second pane, the members one, gives you the current role members and related management actions.
+The role permissions tab is built using a navigation bar, which is showing all available scopes - and the list of permissions from active scope. +Use the scope navigation to show permissions related to each scope.
+Each permission block is structured as follow:
+military
, financial
and industrial
.Warning
+In SeAT 3, leaving the affiliations of a role empty, meant that the role would apply to no relevant entities. It had no effect. This has changed in SeAT 4. If you give a role a permission with no filter, this permission will apply globally to all entities. For example giving the Corporation Sheet permission to a role with no filter means that the members of the role will be able to see the corporation sheets of every corporation on the server.
+The role members tab is a table listing all users who are currently assigned the role. All of them receive the benefits of the permissions which have been defined in the permissions tab from that same role. +You will be able to add or remove any user to or from the role using action buttons.
+To remove an user from the role to which is part, simply click on the "Remove" button located on the member line.
+To add one or multiple user to the role, use the green "Add" button located at bottom right corner. This will show you a dialog box. Use the drop-down control to find users which you want to add. +Once all users to be add have been chosen, click on the "Close" button located at bottom right corner from that modal. Selected users will be shown with a warning background to highlight their addition to the role. +This means their selection isn't saved yet - you have to apply change using the green "Submit" button located under the General pane.
+ + + + + + + + +Starting with eveseat/console@4.7.0 and eveseat/eveapi@4.8.0, a new system has been designed to ensure continuous updates and reduce load on both SeAT stack and ESI.
+Each instance is allowed to get up to 30 buckets. Every bucket will handle a batch of tokens, and their related characters and corporations data update. +Size of bucket is dynamically set based on the following criteria :
+Info
+Most data ESI endpoint and data they deliver are restricted to a 1-hour cache long. +However, certain are shorter and benefit of dedicated command to allow you update more frequently - please, do not abuse of them.
+esi:update:contracts
esi:update:killmails
esi:update:affiliations
esi:update:notifications
You can determine a bucket status using seat:buckets:list
and seat:buckets:info ID
commands.
+The first one will show you all existing buckets in the system together with the amount of token they're managing and their status.
+The second will show you details about a specific bucket including characters they have the charge of.
A bucket can have one of the following status :
+Bucket balancing is run every time a token is created or removed from the system. +As a result, you may find bucket with a certain amount of token at one time and a completely different one at another.
+If you find yourself with unbalanced buckets, you can force them to be balanced using seat:buckets:balance
.
+However, depending on instance state, certain buckets will not be able to be more balanced for a time (ie: lack of tokens).
This system has been designed to ensure there is a bucket to update every two minutes (except for instances with less than 30 tokens).
+You can force bucket to be processed and bypass the scheduler using seat:buckets:update
- however, keep in mind that tokens handled by updating bucket will be frozen for the next 60 minutes.
Hint
+Manual command to force update character and corporation are still available. They require the ID of a tied character.
+esi:update:characters character_id
esi:update:corporations character_id
Occasionally you will need to perform administrative tasks in your SeAT instance running within docker. Be it because you would like to configure TLS for the web interface, change the port of the SeAT webserver or simply generate an admin login URL, this guide aims to help you get familiar for the commands needed for this.
+Many of the commands are exactly the same as those used in a bare metal installation, except for the fact that they are always prefixed with docker compose
and run from the same directory that you have the seat docker-compose.yml
file stored. If your docker-compose.yml
lives in /opt/seat-docker
, you will need to cd
to that directory first and then execute the docker compose
commands.
Info
+With SeAT 5, we migrated from the docker-compose
command to docker compose
. Besides the name, they are fully compatible. If you are still on SeAT 4, you have to use docker-compose
instead of docker compose
for all actions. This applies to all actions, not just the ones listed on this page.
For a quick, birds-eye view on the status of the containers within the SeAT docker stack, the following command may be run:
+ +This should give you the name, entry point, current status and internal ports used within the docker network as output.
+A dockerized installation of SeAT is primarily configured via a configuration file located at .env
. Configuration options such as your applications SSO secrets, SeAT's web server ports are amongst the many configuration options available in this file.
Making changes to this file requires the docker stack to be restarted so that the configuration may be applies. An example case would be when you configure SSO for your instance.
+Once you have made a configuration change, save the .env
file and restart the stack by simply running the following command from the path where the docker-compose.yml
lives:
Getting an idea of what is happening inside of the containers may be useful for many things, including debugging any issues that may occur. All of the containers generate logs that can be viewed either in isolation, or all of the containers in the stack.
+To view a single services' logs (seat-web
in this examples case), run:
All services can referenced by their name using docker compose
. You can see the service names here. At the time of writing this doc, the available services were: mariadb
, redis
, traefik
, seat-web
, seat-worker
and seat-cron
.
To view a single services' logs (front
in this examples case), run:
All services can referenced by their name using docker compose
. You can see the service names here and in the adjacent docker-compose.x.yml
files. At the time of writing this doc, the available services were: mariadb
, cache
, traefik
, front
, worker
and scheduler
.
To view all service logs at once, run:
+ +Once you are done viewing the output, simply pressing ^C will exit the log viewer.
+While most processes will output information to stdout (which is what you will see when you run docker-compose logs
), there are some app specific logs also generated.
If you are getting HTTP 500's, or other exception when using the web interface, the best place to find the relevant logs will be in the seat-web
service, in the /var/www/seat/storage/logs
directory. To reach them, run docker-compose exec seat-web bash
. This will drop you into bash shell in the container:
If you are getting HTTP 500's, or other exception when using the web interface, the best place to find the relevant logs will be in the front
service, in the /var/www/seat/storage/logs
directory. To reach them, run docker-compose exec front bash
. This will drop you into bash shell in the container:
Next, cd to the logs directory with:
+ +This directory should have daily log files for you to view.
+If you think your workers may be causing some exceptions, or you want to investigate why they may be failing, you can do so in the seat-worker
service. Just like for the web UI, get a bash shell and cd to the logs directory.
If you think your workers may be causing some exceptions, or you want to investigate why they may be failing, you can do so in the worker
service. Just like for the web UI, get a bash shell and cd to the logs directory.
The eseye log as well as Laravel log should help you debug what is going on.
+SeAT provides the ability for third party developers to integrate with the core environment to extend its features and functionality. It is possible to install those plugins in a docker environment. Installing a plugin is relatively easy too. All you need to do is add the plugin name to your SEAT_PLUGINS
variable in the .env
file and run docker-compose up -d
again. The plugin will be read from the .env
file and installed as the application container starts.
For example. Open the .env
file (which is most probably at /opt/seat-docker/.env
) and edit the SEAT_PLUGINS
variable to include the package you want to install. In our example we use the pseudo package called user/seat-plugin:
Save your .env
file and run docker-compose up -d
to restart the stack with the new plugins as part of it. Depending on how big the plugin itself may be, this could take a few moments to complete.
You can monitor the installation process by running:
+ +Backups. They are important and really simple to do. To perform a backup of the current database used within the docker stack, compressing and saving it to a file called seat_backup.sql.gz
, run:
To restore a backup to a new dockerized instance of SeAT, run:
+ + + + + + + + + +DEPRECATED!!!
+This guide is deprecated and is not functional in SeAT v3. If you need more performance in SeAT v3 then you have two options, move the DB alone to another server, and/or beef up the server SeAT is running on. This guide may be updated in the future when horizontal scaling is viable again. It is left as is for now due to academic and nostalgic reasons.
+At some stage, you may come to a point where a single install of SeAT might not be enough to process api key updates. +Thankfully, it is actually very easy to scale SeAT horizontally in order to improve performance. +This document aims to share some need to knows before embarking on a tiered installation of SeAT.
+Lets get some definitions cleared up.
+A server is defined as any VPS, hardware, docker container, or other form of virtualization. +When talking performance though, keep in mind that there will probably be very little performance gains when everything runs on the same physical hardware instance.
+A SeAT Component is a collection of SeAT packages and configurations that is responsible for performing a specific task. +Tasks include the SeAT Web Interface, the job workers or dispatchers.
+Before we can talk scale, we need to understand which components SeAT actually consists of. +We will not talk about the immutable resources here as they will be mentioned in the next section.
+So, which components are there to SeAT?
+Each of these components can live on their own server and must share the same immutable resources.
+While almost every component in SeAT can 'run on its own', there are some services that SeAT consumes that SeAT can not scale itself. +Instead, SeAT can consume a clustered or load balanced instance of these services. +There are various reasons for this where the most important is that state is maintained between queue workers using Redis and MariaDB.
+Services that should be shared between all SeAT components are:
+When mentioning these components, they can definitely exist in their clustered/load balanced forms. +For Redis, have a look at their Redis cluster tutorial and for MariaDB, +you can have a look at their MariaDB cluster installation.
+The following example setup is probably the most simple option to gain performance improvements by scaling out. +The gist of it is that we simply add more queue worker components to the SeAT setup.
+Lets start by taking a look at a diagram, showing the extra queue worker component added.
+ +Installing a new server with only the queue worker component setup can bring a significant speed boost into the environment. +A new queue worker could be configured to run an extra 4-6 jobs. This queue worker must be configured to make use of the immutable resources.
+Of course, one can totally go full nelson and explode all of the components in use. +Below is an example deployment (with data flow links, red for redis, blue for MariaDB) that shows how each SeAT component can live on its own server.
+ +Lets talk about component configurations quickly. +Apart from the immutable resources, all of the software needed can be sourced from SeAT packages. +All of the standard requirements such as PHP7.1 and Supervisor 3 also apply. However, not all components would need a web server for example.
+Below are the descriptions (and short requirements list) for the different SeAT components.
+To setup a web front end component, use the following steps:
+public/
directory from the SeAT project.composer
installed and available in PATH
./var/www/seat
using composer create-project eveseat/seat /var/www/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.To setup a queue worker component, use the following steps:
+composer
installed and available in PATH
.composer create-project eveseat/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.seat.ini
file for supervisor to start.To setup a job dispatcher component, use the following steps:
+composer
installed and available in PATH
./var/www/seat
using composer create-project eveseat/seat /var/www/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.php artisan schedule:run 1>> /dev/null 2>&1
every minute.Since SeAT 4.0, there is a way to apply automatic logic between an end user and its roles. +The purpose is to keep distinct the security and automations.
+Squads is the core implementation of the deprecated seat-groups plugin.
+There are multiple kinds of squad. The way they work and the automations they apply depend on their type.
+This is the simplest squad type. +Membership of a squad of this type is controlled by the filters (see below) set for the squad.
+A member of an automatic squad cannot remove themselves from the group. +If a user no longer fulfils the criteria of the filter set for the squad they will be automatically removed from it.
+Manual squads have to be applied to, the processing of the application depends on whether there is a moderator for the group or not.
+If there is no moderator the application will be automatically accepted.
+If there is at least one moderator they can accept or reject applications.
+Filters applied to a squad of this type will have two effects: +- hide the "Apply" button if the filter criteria are not met +- kick the member from the group if the filter criteria are not met
+Hidden squads are visible exclusively to their members and admins. +To be part of a hidden squad, the user needs to be added to it by an admin.
+This mean, only admin user can invite another user to a hidden squad.
+Filters have different behaviors depending on the Squad Type. +In case the Squad is of auto type, filters will be applied continuously to invite and kick members from the Squad - based on user changes.
+Otherwise, filters are used to automatically kick members from a Squad and determine the availability of the "Apply" button on Squad Card.
+Squads Filters have been designed to assist you to build rules which will determine whether a given user is eligible for a Squad. +You pair different conditions together and link them with match keywords.
+Match keywords can be either All
or Any
.
+All
mean all conditions must be met by the user for them to be eligible.
+Any
means that a user is eligible if they meet any of the conditions.
To add a condition, use Add Rule
button located at the end of the modal.
+In case you have to build a complex rule, use Add Group
which will allow you to pair multiple conditions in a single rule.
Info
+Filters come with multiple operators. Not all operators work with all filters.
+Is
and Is not
are used to indicate either equality with criteria or inequality. Those operators are the most common and work with nearly all filter types.
+Contains
is used to indicate that criteria must be included in a domain. This operator currently only works with the Scopes
filter.
Example
+In the example above, we want only users who own at least one character (inside either Get Off My Lawn OR Toilet Paper. alliances) AND with skill Capital Ships to be eligible for membership in our Squad.
+Applications are only available to manual squads.
+For a user to be able to apply to a manual squad they need to meed the squads filter criteria. Otherwise, application button will not be available.
+If the user applies to a moderated squad, they are required to fill an application form. +This will leave you the ability to build workflow internally and allow moderators to check any incoming members. +Users can also cancel squad applications at any time using the Cancel button which will replace the Join button.
+Moderators of a Squad don't need to be part of that squad. +They will be able to see a list of every member of each squad they moderate, allowing them to invite further members or kick existing ones.
+Squad moderators can also see Squad candidates, the time when they applied and each application form. +From there, they can approve an application or reject it.
+When an application is approved, the user who sent it is becomes a member of the Squad. +If an application is denied, the application is removed and user can submit a new application.
+Only administrator users can add or remove moderators to/from a Squad.
+Squads list is the entry point of squads. You can create a new squad, search for a squad, show available squads and get squad status from there.
+The Squads list is available to all users, without any restriction. You can access it using Squads
from the left sidebar.
The list is split in three main areas. +First area, at top, contains controls which will allow you to create a squad, or filter the shown squads. +The main area, contains squads tiles from the active page. You can get up to six squads per page. +Footer area is the pagination controls - allowing you to switch displayed page (first, previous, current, next and last).
+ +Every Squad Tile is built following the same pattern :
+1) Logo +2) Name and description +3) User status related to that squad +4) Metadata +5) Type
+ +Except metadata, other attributes are self-explained. Metadata is a list of counters showing you, from left to right:
+Hint
+Squad Logo is a visual way for your end user to identify quickly a Squad. +By default, logo are generated based on the Squad Name - but you can customise it in the Squad settings.
+When you click on a Squad Tile, you'll land on the related Squad Card. Squad Card is the landing area of a Squad. +You will retrieve summarised information you had on the tile in the general pane.
+In case the Squad is manual, you will get access to the list of Squad moderators. +This list is public, this mean everyone can see it, without consideration if he's or not a member of that Squad.
+ +Under the general pane, you'll get access to the list of roles assigned by the Squad. +This list is disclosed to admin user only. This mean neither "standard user" or moderators will get access to it.
+From that pane, you are able to remove a role from the squad or add other ones to it.
+ +Members pane is visible to all moderators and squad members. +Moderators can invite or kick user from the squad using actions buttons.
+ +Info
+When an user is kicked or invited from/to a Squad, the event is shown into security logs. +You will be able to see who kick or invite any user from/to any Squad.
+Last but not least, there is an extra Candidates pane which is available on Manual Moderated Squad. +Squad applications can be managed from this area.
+ +When you create a new Squad, you have to fill a small form which will define it. Mandatory elements are :
+You also can upload a shiny logo which will be used instead the generated icon and provide filters for squad eligibility.
+ +Caution
+As soon as you save your Squad, filters are applied. +In case the Squad is of auto type, eligible members will be added to it. +For any other Squad Types, non-eligible members will be kicked from the Squad
+Hint
+Don't pay attention to your Squads Description. If it's too long, it will be shortened when displayed on the Squad Tile. +However, the full description will always be available on the Squad Card into the general pane.
+SeAT implements the Google Analytics Measurement Protocol. +This document aims to explain in as much detail as possible how it has been implemented in SeAT, as well as what is tracked and what is not. +This document aims to be as transparent as possible.
+Well, the most obvious is it being nice to know how much SeAT is actually being used. +One may argue that Github & packagist gives statistics on how many times the project has been installed / cloned, but that does not really +reflect how many actual active installations there are.
+Knowing how many active installs there are, encourages development.
+Lastly, certain exception types are also sent as hits. This helps immensely with figuring out if a new version may have a serious bug.
+First of all, the Google Analytics Measurement Protocol is really just that. It just measures usage. In summary, when certain events happen, +only a hit with what happened is sent. No other data is sent with the hit.
+For example. When the scheduler queues jobs, a hit is sent that says that this happened, and that it happened for x amount of keys.
+This can be seen in the following line of code: QueueKeys.
+It can also be seen that no other data goes along with the hit. For example, the access_token
and refresh_token
+(which is what most will be worried about) does not go with the hit.
Once a hit is getting ready to be sent, information such as which OS/Version as well as versions of installed SeAT packages gets sent along with the hit. +This can be seen in the following lines of code.
+Very special care has been taken to ensure that no personally identifiable information goes along with the Measurement Protocol hits. +In fact, its actually not allowed and serves no purpose for tracking. +That being said, the following actions have been taken to ensure that privacy is key:
+a
is specifically not sent as it will disclose the hostname of the server (Ref: eveseat/services:Jobs/Analytics#L151-L153)Sure!
+ +Not at all. However, as a start I am going to limit access to people whom have actively contributed towards SeAT. +If you would like access, please ping me on Slack.
+If you insist on disabling the usage tracking, you can do this (as a SeAT administrator) by browsing to Configuration -> SeAT Settings and +setting Allow Tracking to No.
+ + + + + + + + + +Below is a list of packages contributed by the community. These packages normally follow the same installation procedure, however, its best you consult the documentation of the package itself in case there is anything special you need to get it working.
+Packages will normally come in the form of a composer package that you need to include in your SeAT install, as well as a Service Provider that you need to bootstrap. So, generically speaking, installing a package will mean that you:
+Ensure that you are in the path where you installed. By default, this should be /var/www/seat
.
Put your application into maintenance mode. This will ensure that no request from the outside will hit your applications logic, and also help you perform an upgrade uninterrupted. Do this with the following commands issued as the webserver user:
+Installing packages like this will ensure that none of the core SeAT packages are affected and you should be free to upgrade SeAT core at anytime.
+Applying community packages to your SeAT instance with Docker requires you to update your .env file located in /opt/seat-docker
and uncommenting SEAT_PLUGINS by removing '#' and entering the package(s) to be installed separating each package with a comma. An example of how to enter packages in your .env would be:
/opt/seat-docker
:After running the above command wait for containers affected to rebuild. If SeAT does not come back up refer to Troubleshooting for more insight.
+Package | +Version (SeAT 4.x) | +Version (SeAT 5.x) | +Installation | +Description | +
---|---|---|---|---|
alliancewaw/seat-mumble-register | ++ | + | + | Read the docs This plugin provide an extension to generate a certificate for SeAT user and regist it to mumble server | +
cryocaustik/seat-hr | ++ | + | + | Human Resources plugin for SeAT with Applications (with customized questions per corporation), Blacklist, Intel, Kick History, Notes, and Sheet | +
cryptaeve/seat-squad-sync | ++ | + | + | Adds the ability to sync squad members into filters of permissions | +
cryptaeve/seat-text | ++ | + | + | A module to serve public static ascii, with editing access controlled by seat | +
denngarr/seat-fitting | ++ | + | + | Module to check fittings per character | +
denngarr/seat-srp | ++ | + | + | A module for SeAT that tracks SRP requests | +
h4zz4rddev/seat-buyback | ++ | + | + | A SeAT module for buyback functionality | +
humunuk/alliance-structure-mngmt | ++ | + | + | Add "Structures" sub-menu to Alliance page and show all the structures that belong to corps in alliance | +
kassie/calendar | ++ | + | Read the docs | +Calendar plugin | +
pyTonicis/seat-corp-mining-tax | ++ | + | Read the docs | +A Modul to manage corporation mining tax | +
warlof/seat-discord-connector | ++ | + | Read the docs | +A Discord driver to be used with seat-connector |
+
warlof/seat-teamspeak | ++ | + | Read the docs | +A Teamspeak driver to be used with seat-connector |
+
recursivetree/seat-info | ++ | + | Read the docs | +A module that adds a small wiki-like article systems for example as a corporation bulletin. SeAT 5.x You need to follow special steps after upgrading to retain your resource files. |
+
recursivetree/seat-rat | ++ | + | + | A module to monitor ratting usage in a system, e.g. to prevent dropping the bounty risk modifier in nullsec. | +
simplyunnamed/seat-user-last-login | ++ | + | + | Tool to help find potential AFK's in your corporation. | +
recursivetree/seat-billing | ++ | + | + | A billing module to help you with ore and rating taxes. | +
recursivetree/seat-pushx-blamer | ++ | + | + | A module to tell you who's guilty of blocking the PushX queue. | +
recursivetree/seat-alliance-industry | ++ | + | + | A corporation/alliance/coalition industry order marketplace | +
recursivetree/seat-inventory | ++ | + | + | Inventory manager for contracts and corporation hangars. | +
recursivetree/seat-transport | ++ | + | + | This plugin is a calculator for hauling costs, for example for an alliance JF service. | +
recursivetree/seat-mineral-hauling | ++ | + | + | Calculates the most efficient way to move minerals in refined ore form. | +
These packages implement different prices sources for the recursivetree/seat-prices-core price provider system. If you are on SeAT 5 and use a plugin that uses recursivetree/seat-prices-core internally, you can install and use any of the following price provider packages.
+Price Provider | +Version | +Description | +
---|---|---|
recursivetree/seat-prices-evepraisal | ++ | Prices from evepraisal clones | +
recursivetree/seat-prices-evemarketer | ++ | Prices from evemarketer.com | +
cryptatech/seat-prices-janice | ++ | Prices from https://janice.e-351.com/ | +
cryptatech/seat-prices-fuzzwork | ++ | Prices from https://market.fuzzwork.co.uk/ | +
These packages provide utilities for other packages and usually don't need to be installed manually.
+Package | +Version | +Description | +
---|---|---|
warlof/seat-connector | ++ | A generic connector module that handles invites and roles management with any registered platform | +
recursivetree/seat-treelib | ++ | A module that contains shared code for all recursivetree/* plugins |
+
recursivetree/seat-prices-core | ++ | This plugin provides a price provider system for all plugins dealing with prices. Seat 5.x only. | +
Package | +Version | +Description | +
---|---|---|
eve-scout/eveseat-oauth2-server | ++ | This EVE SeAT package enables an OAuth2 server for Single sign-on. | +
flyingferret/seat-whtools | ++ | A small collection of tools for helping with Wh-Life corporation management, including calculating doctrine stocking levels (based on contracts and denngarr/seat-fitting plugin), a blue loot tax calculator, and a skill base certificate management. Currently very much a work in progress. |
+
freedenizen/eveseat-notes | ++ | A notes addon for seat 1.x | +
herpaderpaldent/seat-discourse | ++ | SeAT Discourse enables SeAT to act as SSO provider for your Discourse-Forum instance. Groups and Categories do respect roles of members. With this package you can create hidden sections for your member and public sections for potential recruits to which members get automatically access to. Important: Check installation instructions on Github. | +
herpaderpaldent/seat-groups | ++ | Module to create auto, open and managed role groups to which user can be automatically be assigned, user can opt-in or user can apply to. | +
herpaderpaldent/seat-notifications | ++ | This is a fully functional notification package for discord and slack notifications. This package is very easily extendable by other packages and should replace core notifications at some point. Currently seat-groups provide many useful notifications. Notifications are send out by slack or discord bot and uses twice a full oAuth2 authentication of the user. | +
warlof/seat-migrator | ++ | A migration script between SeAT 2 and SeAT 3 | +
warlof/seat-slack-sso | ++ | Slack SSO integration for seat 2.x | +
warlof/eveseat-mining-ledger | ++ | ESI capability that provides a mining ledger to SeAT 2.x | +
warlof/slackbot | ++ | A slack bot that handles invites and kicks based on an api key | +
Danger
+Packages after this message are provided as history and idea database. They will not work on the stable version since they are non longer maintained by their author or have been integrated in core.
+Sometimes it can be useful to install a version different from the latest version, for example if you want to install an older version of a plugin or if you want to test a bugfix. The easiest way to find all available versions is to go to the packagist site of the plugin by clicking on the version in the available plugins list. On packagist, if you scroll down, to the right you will find a list of all available versions.
+Follow the normal installation steps, but change the composer require
command to include the package according to the following example:
In your .env
file, add the version to the package like this:
In your .env
file, add the version to the package like this:
In your .env
file, add the version to the package like this:
This page aims to give a brief overview of how configuration is handled in SeAT and its packages. +To give some perspective, we have to have a quick look at how packages are built and bootstrapped.
+All of SeAT's core internals are built as packages. This means, every package has a service provider.
+All a service provider really is, is a class with 2 methods ie: handle()
and register()
.
+When a service provider is bootstrapped into the application, these 2 methods are called at some stage.
It is in these methods that we tell the Laravel framework more about our package.
+Amongst many things that we can tell it, one of them is configuration related.
+All we really telling the application is where the configuration file is, and under which namespace does it live.
+Another important fact is that SeAT package configurations are added with the mergeConfigFrom()
method.
+This means, you can override the defaults in your installation without worrying about breaking the package itself.
Lets take a look at a sample package configuration file: The eveseat/eveapi package for example.
+At the time of this writing, it has 5 configuration options. The first being a version
, the last being eseye_loglevel
.
+When this package is installed, this configuration file will live somewhere deep inside your vendor
folder.
+Changing the value there is not impossible, but it will be lost with the next package upgrade.
+The better method will be to override the change locally, inside you config/
folder here.
eseye_loglevel
¶To start, create the file eveapi.config.php
inside the config
folder.
+Next, we add the contents in the file to return an array, specifying the eseye_loglevel
key and its new value.
+The file would look something like this:
That's it. The configuration should now have been overridden.
+ + + + + + + + +SeAT requires email to be setup to allow for things like notifications to be sent. +This guide will attempt to describe how to go about setting up your email using GMail as an SMTP.
+As with anything Laravel, the config for your email setup will live in your installs .env
file. To use GMail as an SMTP service, set the MAIL_DRIVER
option in your .env
configuration file to smtp
. Next, specify the SMTP details:
Done! To test, you can add some mail notification using the Integrations
and Notification groups
.
SeAT requires email to be setup to allow for things like notifications to be sent. +This guide will attempt to describe how to go about setting up your email using the Mailgun service. +Though Mailgun is a commercial service, you get to send 10k emails for free per month. +It also provides epic stats for you to track emails with etc.
+As with anything Laravel, the config for mailgun will live in your installs .env
file.
+To use the Mailgun driver, first set the MAIL_DRIVER
option in your .env
configuration file to mailgun
.
+Next, we will add two options to specify details about our mailgun account.
To find out the values you need to populate, login to your mailgun account and browse to the domains section. +Pick the applicable domain name. The screen you will see should looks something similar to this:
+ +The big title (sandbox1XXXXXXX
in my case) is the domain name, and the field titled API Key
is the MAILGUN_SECRET
.
Done! To test, you can add some mail notification using the Integrations
and Notification groups
.
In both the case of a Docker installation as well as a host based installation (manual or via SeAT tool), SeAT has some configuration values that can be set via an .env
file. Depending on your installation type, this file will be in either /opt/seat-docker/.env
or in /var/www/seat/.env
Parameter Name | +Default value | +Description | +
---|---|---|
APP_URL | +http://seat.local | +This is the public address where SeAT instance is reachable. That should match with the EVE_CALLBACK_URL without /auth/eve/callback suffix |
+
DB_HOST | +127.0.0.1 | +This is the IP or domain from your SQL Server. | +
DB_PORT | +3306 | +This is the port used by your SQL Server to receive query. | +
DB_DATABASE | +seat | +This is the name for your SeAT database. | +
DB_USERNAME | +seat | +This is the user which is granted to the SeAT database from SeAT server. | +
DB_PASSWORD | +secret | +This is the user password | +
MAIL_DRIVER | +smtp | +This is the driver used to send mail. It will be covered in a dedicated article. | +
MAIL_HOST | +smtp.mailtrap.io | +This is driver mail hostname. It will be covered in a dedicated article. | +
MAIL_PORT | +2525 | +This is the driver mail port. It will be covered in a dedicated article. | +
MAIL_USERNAME | +null | +This is the driver mail username. It will be covered in a dedicated article. | +
MAIL_PASSWORD | +null | +This is the driver mail password. It will be covered in a dedicated article. | +
MAIL_ENCRYPTION | +null | +This is the driver mail encryption. It will be covered in a dedicated article. | +
MAIL_FROM_ADDRESS | +noreply@localhost.local | +This is the mail address which the user will chown when he will receive mail from SeAT. | +
MAIL_FROM_NAME | +SeAT Administrator | +This is the name which the user will chown when he will receive mail from SeAT. | +
EVE_CLIENT_ID | +null | +This is the EVE Application Client ID you'll get when you created an application over https://developers.eveonline.com | +
EVE_CLIENT_SECRET | +null | +This is the EVE Application Client Secret you'll get when you created an application over https://developers.eveonline.com | +
EVE_CALLBACK_URL | +https://seat.local/auth/eve/callback | +This is the EVE Application Callback URL you filled when you created an application over https://developers.eveonline.com. You should have only to fix seat.local |
+
QUEUE_BALANCING_MODE | +false | +Determine the workers balancing mode used by the Jobs Manager. Value can be false , auto or simple . See official Laravel documentation for more details |
+
QUEUE_WORKERS | +4 | +Determine the amount of worker which have to be spawn to process jobs over all queues. In auto and simple balancing, this value cannot be lower than 4 as it's correspond to the available queues. |
+
For normal operations within SeAT, authentication is provided by EVE Onlines' SSO service and API access with ESI and tokens supplied via SSO. Technical details behind the SSO implementation can be found here.
+Authenticating users using SSO effectively means that users may authenticate to SeAT using their existing EVE Online credentials. SeAT does not have access to the credentials itself as that is handled entirely by CCP. Only once authentication is successful from an EVE Online perspective does a user get asked if they want to allow your SeAT installation to have access with the configured set of scopes. Once the user agrees to these scopes, the users browser is redirect back to SeAT and will be logged in.
+If you have not configured this yet, the login page will present you with a warning about it:
+ +A bit of setup work is needed in order to have your SeAT setup ready for SSO integration and ESI usage. The gist of it is:
+EVE_CLIENT_ID
, EVE_CLIENT_SECRET
and EVE_CALLBACK_URL
in the .env
configuration fileBrowse to the EVE Online Developers portal and create a new Application.
+ +Give your application a meaningful Name and a Description. Users will see this name when they review the access Third Party applications have to their account so keep that in mind when registering your application.
+ +Next, set the connection type to Authentication & API Access (1), select the ESI Scopes you want (probably all of them) (2) and specify the Callback URL (3)
+To select ESI Scopes you can search for them in Available Scopes (2) and select the desired scope. The selected scope then will moved to (3).
+ +Note on the Callback URL
+The Callback URL where the user should be redirected to once authentication was successful. In other words, once they have completed authentication using their EVE Online credentials, they need to be redirected back to your SeAT instance. In the example above, we can see it is https://seat.local/auth/eve/callback
. You should replace the seat.local
part with your domain!
For example, assuming you are hosting SeAT at https://this.is.seat/
, then the Callback URL will be https://this.is.seat/auth/eve/callback
. If you have SeAT in a sub folder on your web server, remember to add the folder name before /auth/eve/callback
.
With the new application created, you will now have the EVE_CLIENT_ID
, EVE_CLIENT_SECRET
that you need to configure in SeAT itself. Take note of these values.
.env
file¶We are almost done. The next thing to do is to add the configuration parameters to our SeAT installs .env
file. Browse to your SeAT installation directory and edit the .env
file (note this is a hidden file and wont show up when you just type ls
).
Look for the following section of the file and populate the values with those you got when you created an application on the developers site:
+Your .env
file is located in /opt/seat-docker
. Rebuild your app after setting the ESI Details in it using:
Requests to the EVE API need to have an administrative contact email set before SeAT will queue jobs to process. CCP made the request in this Github issue. To address this, the email address is added to the User-Agent string that is used when making EVE API requests as can be seen eveseat/eveapi:Helpers/PhealSetup#L77.
+The error Failed to queue due to default config
is generated by eveseat/eveapi:Traits/JobManager#L47-L56 check. In order for this check to pass, you need to configure the administrative email address in the SeAT configuration.
Adding the email address can be done in two ways. Wither via the command line or via the Web interface.
+The other method to change the admin email is via the web interface. You need to be logged in with a user that has the superuser
role. Typically, if the email address is not set, you may notice the following warning on the home page:
To configure it, browse to Configuration -> SeAT Settings from the side menu, and set the email in the Administrator Email field.
+ +The command php artisan seat:admin:email
will prompt you to add a valid email address for the administrative contact:
Example:
+ + + + + + + + + +SeAT sources information about the SDE from a json file hosted here. It may happen that the SDE gets updated but the the json resource has not yet been updated. For this reason, its possible to specify the version to get based on what is available on www.fuzzwork.co.uk.
+Check the version of SDE dumps available on www.fuzzwork.co.uk. At the time of this writing, frostline-1.0-116241
was the latest. Once you have the version string ready, open the .env
configuration file and add a key as follows:
When running the SDE updater, specify the --local
parameter to source the version string from the configuration file:
Info
+By default, SeAT automatically updates the SDE every month. You may want to login as an administrator and remove the schedule to update it monthly if you have overridden the default.
+This section aims to describe the functional differences between the various SeAT packages.
+Namespace: Seat\Api
+Source Code: link
+This repository contains all the SeAT Api Endpoints, as well as the routes and views for API key management.
+Namespace: Seat\Eveapi
+Source Code: link
+This repository is the heart of the API update logic. It is responsible for doing the actual update work, pulling the EVE API documents from ESI, parsing them and storing the resultant data in the database. Most of the data models live in this repository too.
+Namespace: Seat\Notifications
+Source Code: link
+This repository contains a set of scheduled jobs that perform notifications type tasks. A notification can be something as simple as an alert about a corporation member that has been inactive for a period of time.
+Namespace: Seat\Web
+Source Code: link
+This repository contains the web interface for SeAT. It contains by far the most complex service provider and will undoubtedly become the prime example/reference when developing packages for SeAT. This package is also the only one that has a permissions / ACL concept. Refer the to the permissions document for more information.
+Namespace: App
+Source Code: link
+This is the main SeAT repository. It does not really contain much logic. In fact, it should just be seen as the glue between all the core packages. This is the repository that is cloned when a new installation is done.
+The most important part of this repository is the service providers that are bootstrapped with the application. The providers array has the default Laravel providers as well as the SeAT providers at the end. These providers tell the application where to find routes, views, configs etc. For more detailed information about providers, refer to the Laravel 5.5 documentation. When you write your package though, you should make use of package discovery as described in the Laravel 5.5 documenation. This will make the installation of your package super simple without the need to edit any files.
+Namespace: Seat\Services
+Source Code: link
+This repository contains 'services'. A service is defined as any form of helper and or repository that other packages can depend on. The eveseat/web package (amongst others) make heavy use of the repository classes in this package.
+ + + + + + + + +Since SeAT 4 and including SeAT 5, starting with Docker build 4.1.0, spawning a development environment has been made easier. +You can use the same image as of production environment - either you're working on core packages or third party ones.
+First, start with standard installation to get a working environment.
+The official docker-compose wrapper is shipped with a packages
directory.
+It is mounted readonly, and you can store your development sources in it.
To make things easier, we recommend you keep vendor path convention to split your sources across every single package you want to play with.
+Developing plugins and core packages doesn't differ at all, modules installed in the packages
directory always take priority.
+In the case of core modules, this means the version from packages
and not the version provided by the docker container will be used.
The image has been designed to look for a file called override.json
inside packages
directory.
+When it is found, it will be merged together with standard composer.json
file from eveseat/seat
package.
It's designed to override both autoload
and providers
.
+Here is a complete override.json
structure:
An override can have either autoload, providers or even both property.
+Do not forget to escape \
in order to get a valid json file.
When your container will start, mapping from autoload
property in your override.json
file will be merged with autoload-dev
property from official composer.json
.
SeAT 4.x
+docker exec seat-web sh
where seat-web
is the name of the target container.artisan
commands from outside of docker with docker exec seat-web php artisan <command>
SeAT 5.x
+docker exec front sh
where front
is the name of the target container.artisan
commands from outside of docker with docker exec front php artisan <command>
Please note that there is currently no way to install dependencies with the package override.
+As an example, let's say I want to make a new feature in web core package, I'll spawn an eveseat
directory at root packages
directory, followed by a clone from eveseat/web
git repository.
+Last but not least, I'll create an override.json
file to inform SeAT there are developer things to load.
packages
directory mkdir packages/eveseat
packages/eveseat/web
directory git clone https://github.com/eveseat/web.git packages/eveseat/web
override.json
to use custom web sourcesTips
+If you're working with Windows, prefer to store your files in wsl layer rather than Windows directory. +Both work, however, you'll get better performances!
+This page contains general tips and tricks that may be useful during package development.
+No doubt, there are no limits to what code you can write, how you structure it and how you name things. However, the last thing you want is to have conflicts with the SeAT core, or someone elses package! The following list contains some tips to help you avoid those conflicts and to help people better discover your packages:
+seat
eg: seat-teamspeak
.seat
.Author\Seat\Package\
eg: Warlof\Seat\Teamspeak\
.warlof_teamspeak_users
.
+ Although you shouldn't make your prefix too long, as there is a 64 character table length limit.warlof.teamspeak.address
.warlof.teamspeak.channels
.composer.json
file, set the type
to seat-plugin
.seatcore
like this: seatcore::my.route.to.someting
. You should follow a similar format: seat<plugin name>::<route>
Depending on what your package does, it may be interesting for you to know when data is created / deleted. Given that SeAT makes use of Laravel, you have the ability to subscribe to events that occur on any model within SeAT.
+For example, should a User
model get deleted, the deleted
event will get fired. Writing an observer class and subscribing to it with \Seat\Web\Models\User::observer(\My\Namespace\UserObserver::class)
will allow you to define a deleted()
method inside of your observer class and perform extra logic with the User
that got deleted.
Examples of where this may be interesting could be if you need to have cleanup code for tables that your package includes.
+For more information, checkout the Laravel documentation on Eloquent Observers.
+ + + + + + + + +When a job is queued, it's instance is serialized and push into the Redis database. +Horizon, our jobs orchestrator is taking care of every new jobs falling in redis and push it to an available worker from the targeted queue.
+With SeAT 4, queues have been renamed and are scoped. This helps to identify load per "topic" and ensure better parallel processing of jobs.
+As shown bellow, queues characters
, corporations
and public
are dedicated to ESI jobs.
There is a dedicated queue to handle notifications tasks (like notifying a killmail on Discord). +So, you will always get your notifications as fast as possible.
+The last two other queues (high
and default
) have a general purpose.
high
queue is dedicated to jobs which have a critical level (like those related to security)default
queue is a bucket collecting all jobs without any other specified queueThe default (and recommended) jobs handling configuration is using auto balancing. +This ensures every single queue always have a minimum of workers (1 is the default value).
+Important
+There are no ranking in queues, so, the high one is not most important than other in the way jobs are processing. +Queue name doesn't influe on their ability to process load. So, please use high queue for really important/critical tasks only.
+An editable draw.io xml to import can be found here: seat_jobs_flow.drawio
+ + + + + + + + +Seat 5
+This guide is already updated for seat 5. Older versions of this guide can be found on github.
+SeAT is shipped with a built-in notification system which is able to send message across the world to almost any platform.
+It is supporting e-mail, Slack and Discord out of the box.
+However, thanks to Laravel, if you need to support another platform - you simply need to implement the related driver. See official Laravel Notification Channels website to get more about this.
+Additionally, there is a system to mention certain users when a notification gets sent. Since we don't assume that many people need to implement this for a new platform, there is no written documentation. This is a good starting point to read the code: Config/notifications.mentions.php
+All notifications must be declared inside notifications.alerts.php
. You will want to create a file named like this in the Config
directory of your plugin and then use mergeConfigFrom
in your service provider to merge the seat core and plugin notification configuration.
+Every entry must follow this pattern:
created_user
must be unique overall system and will identify the very specific notification declaration. It will reference the notification definition composed of label
and handlers
keys.label
will reference a translation token - this is the value which will appear on user interface into notification settingshandlers
key is containers a list of available formatters. There is a formatter per available platform - or so called - channel.visible
key hides the notification from the list of available notifications, but you can still use the seat notification infrastructure normally. Realistically, you don't need this for anything.You can also look at the seat core notifications.alerts.php file as an example.
+Formatters are class which will define how message targeting a specific channel must be structured. +In upper example, we have two formatters:
+Formatter must extend a different abstract class depending on what kind of platform it supports:
+Seat\Notifications\Notifications\AbstractDiscordNotification
Seat\Notifications\Notifications\AbstractSlackDiscordNotification
Seat\Notifications\Notifications\AbstractMailNotification
Every formatter is composed of the following method:
+populateMessage(Message $message, mixed $notifiable)
which will generate the structure message for the target platform. The type of Message
differs slightly according to which platform you're on, e.g. on discord it is a Seat\Notifications\Services\Discord\Messages\DiscordMessage
, on slack it is a Illuminate\Notifications\Messages\SlackMessage
.In SeAT, notifications are event based and sent by jobs queued in notifications
queue. This prevents to lock system while sending the information.
To send your notification, you will listen for system events (ie: a character notification created in the database) in order to dispatch the selected notification.
+All characters related notifications are handled by \Seat\Notifications\Observers\CharacterNotificationObserver
+It is waiting for an Eve Online notification targeting a character to be registered and dispatch the related message to the requested platform - if asked for.
+SeAT is shipped with numerous notifications - but due to the number of existing ones and the fact that there are regularly news notifications created by CCP attached to added features, it might append that a notification isn't handled.
+You can track such cases using debug
log level which will generate a log entry looking like this:
++Unsupported notification type.\ + type: TheNotificationTypeAsPerESIDefinition (see: https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications)\ + sender_type: character\ + notification: the YAML structure of the notification
+
You'll find all standard notifications handler related to character into the following namespace: \Seat\Notifications\Notifications\Characters
+Most of the corporations related notifications are handled by \Seat\Notifications\Observers\CharacterNotificationObserver
+It is waiting for an Eve Online notification targeting a corporation to be registered and dispatch the related message to the requested platform - if asked for.
+SeAT is shipped with numerous notifications - but due to the number of existing ones and the fact that there are regularly news notifications created by CCP attached to added features, it might append that a notification isn't handled.
+You can track such cases using debug
log level which will generated a log entry looking like this :
++Unsupported notification type.\ + type: TheNotificationTypeAsPerESIDefinition (see: https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications)\ + sender_type: corporation\ + notification: the YAML structure of the notification
+
Alternatively, notifications related to corporation member state are handled by \Seat\Notifications\Observers\CorporationMemberTrackingObserver
+You'll find all standard notifications handler related to corporation into the following namespace: \Seat\Notifications\Notifications\Corporations
+All killmails related notifications are handled by \Seat\Notifications\Observers\KillmailNotificationObserver
+It is waiting for a killmail being registered and dispatch the related message to the requested platform - if asked for.
+All squads related notifications are handled by \Seat\Notifications\Observers\SquadApplicationObserver and \Seat\Notifications\Observers\SquadMemberObserver
+It is waiting for squads members and applications to be registered and dispatch the related message to the requested platform - if asked for.
+You'll find all standard notifications handler related to Squads into the following namespace: \Seat\Notifications\Notifications\Seat
+All users related notifications are handled by \Seat\Notifications\Observers\UserObserver
+It is waiting for a user to be registered and dispatch the related message to the requested platform - if asked for.
+You'll find all standard notifications handler related to character into the following namespace: \Seat\Notifications\Notifications\Seat
+All notifications continue to work without any changes, even though there have been major refactors. However, to profit of the new mentions system behind discord pings, you need to change a few things to update to the new notification structure:
+Seat\Notifications\Notifications\AbstractNotification
. Seat\Notifications\Notifications\AbstractDiscordNotification
Seat\Notifications\Notifications\AbstractSlackDiscordNotification
Seat\Notifications\Notifications\AbstractMailNotification
toX()
method to a protected populateMessage(Messagetype $message, $notifiable)
. Instead of creating a new message, use the parameter $message
. The type Message
must be adjusted depending on your platform:Seat\Notifications\Services\Discord\Messages\DiscordMessage
Illuminate\Notifications\Messages\SlackMessage
Illuminate\Notifications\Messages\MailMessage
Seat\Notifications\Traits\NotificationDispatchTool
trait to dispatch notification. It helps to deduplicate the most common logic.The old plugin structure will stop working in seat 6.
+ + + + + + + + +So, you want to write a SeAT package? Hopefully this guide helps you along the way! This guide was written while writing the API package for SeAT here. I figured it would be best to try and capture the process to help in case I miss any important details.
+Be sure to also have a look at the Development Tips page!
+I think its important to keep in mind a few things about how SeAT is put together. The most important being a brief description of what each core package offers, and how you can integrate with them. For a breakdown on what the core packages provide, please refer the to [breakdown].
+SeAT 4 is written on Laravel 6, while SeAT 5 uses Laravel 10. A very good thing to do would be to actually read the documentation top->bottom and get an idea of what is possible with the framework. SeAT core packages make heavy use of many of the features, based directly of what has been interpreted by this very documentation.
+If you really want to start contributing packages, but just cant get your head around this whole Laravel thing, then I can suggest you have a look at this excellent free course material covering the basics of what you will encounter in the SeAT codebase. https://laracasts.com/series/laravel-6-from-scratch
+Other plugins and the SeAT core are also a good learning resource.
+The very first thing to do is prepare the empty git repository on say Github, as well as the composer package itself. Clone a clean repository, and run composer init
, answering any questions. Once that is done, edit the resultant composer.json
and prepare the autoload
block. SeAT core follows the PSR-4 autoloading standard. I will suggest you do the same. For some more detailed composer info, refer to the docs here. For the API package, I am going to autoload Seat\Api from the src
directory using PSR-4.
As mentioned in the package breakdowns, the eveseat/seat repository bootstraps packages via service providers or package discovery. This is actually a Laravel convention that SeAT just follows. To get our package ready, we need to create a service provider. For the API package, I create an ApiServiceProvider
class in src/
directory which extends Seat\Services\AbstractSeatPlugin
. Our packages file structure now looks as follows:
Hint
+The AbstractSeatPlugin
class is extending Laravel ServiceProvider
class and ship you with useful methods that help to register your plugin in the stack (including version discovery, permissions registration, etc...).
+You must use it rather than the standard one, especially if you want permissions and get your packages in Settings > SeAT Settings > SeAT Module Versions pane.
From here you pretty much free to do what you want. How you structure the package will obviously depend on what exactly your package provides. In principle, I prefer to follow the same package structure as Laravel does for web / console features. Since we are going to be providing web features with the API, we will quickly create a few folders in preparation for this. I know beforehand that we are going to need a model to store API tokens; middleware to authenticate API requests; routes and controllers for the actual api logic (preferably making use of the eveapi/services repository classes for data access) as well as a few web views for administrators to generate API tokens for applications. With that in mind, the initial structure looks as follows:
+This will obviously change as we progress building the package.
+To start testing the API, we need to add a route and controller to process some requests and responses. My routes.php
file will have a global Route::group()
to encapsulate the routes in the Seat\Api namespace as well as prefix them with api/
.
See the final product here for a more complete example.
+Next, I add some logic with a route to /
, update the base frameworks composer.json
to autoload the Seat\Api namespace from the directory where my package lives, run composer dump-autoload
and add the service provider to the eveseat/seat repositories app.php
providers array. Lastly, I add a method to the service provider to load the routes and call it form the boot()
method in the generated stub.
See the complete service provider here
+As a final test, I check that my route is accessible from a booted SeAT app. :)
+Obviously, some routes are not for everyone's eyes. SeAT comes with middleware that can be used to filter out requests that may not be authorized for your route. As can be seen in the example below (from here), we are filtering out requests to api-admin
for only superusers.
I suggest you have a look at the eveseat/web
packages routes definitions for more examples on how the middleware is used. https://github.com/eveseat/web/tree/master/src/Http/Routes
It is recommended that you scope the route name defined in 'as' => 'seatcore::api-admin.list'
. For example all routes from the seat core start with seatcore
like this: seatcore::my.route.to.someting
. You should follow a similar format: seat<plugin name>::<route>
To auth our API requests, we are going to go with token based authentication for now. We want users to present us with a X-Token
header (from a valid allowed src IP address) before they may proceed with their request. To do this, we will filter requests using middleware. Thankfully, again, Laravel comes with a command to stub us some empty middleware. Run php artisan make:middleware ApiToken
and copy it to your projects Middleware
folder. Next we should register the middleware in our service provider. I do this by adding a method and calling it in boot()
.
See the complete middleware here
+Although almost all of our interfacing with this package will be via the json api endpoints, we need to add a few routes that will give an administrator the ability to generate API tokens as well as view logs etc. This will be for an administrator, so we will re-use the ACL features provided by the eveseat/web
package to ensure that only admins an access our api-admin routes. Views live in resources/views
and are bootstrapped to the api
namespace in the service provider. See the service provider here for an example.
Note how we are re-using views that exist in the web
namespace. All we have to do is extend one of the grids like here and start without our blade template.
Integrating with the sidebar is also really easy. All you have to do is create a config file, bootstrap it in the service provider and viola. The config file itself has a set structure for the web
package to interpret and can be seen here.
The format is generally an array, whereby the first key is the name of your package (api
in this case). Thereafter you can specify the main entry, and any sub entries you want to add. The route
key should refer to the named route. The sidebar loader will resolve the route itself for you. If you have any permissions requirements for your package, the permission
key can be used together with a required SeAT permission to render the view.
Integrating with the character sub menus is also really easy. Just like the sidebar, all you have to do is create a config file, bootstrap it in the service provider and viola. The namespace should be named package.character.menu
in your service provider. A sample config file can be seen below:
Integrating with the corporation sub menus is also really easy. Just like the sidebar and character menus, all you have to do is create a config file, bootstrap it in the service provider and viola. The namespace should be named package.corporation.menu
in your service provider. A sample config file can be seen below:
In the above items, we refer to the files needing to be bootstrapped via the service provider. All this really means is that we have to tell the Laravel application where to find configuration information for a namespace. So, if we wanted to add a sidebar item, we would add the following line to the register()
method of the service provider:
The first argument is the file with the sidebar definitions, the second is the namespace.
+You are able to register and use your own permissions for use within SeAT. This is relatively simple and done by creating a config file in the location Config/Permissions/package.permissions.php
. It should return an array of the following format:
property | +mandatory | +purpose | +
---|---|---|
label | +yes | +The displayed name of your permission. It must be a translation token. | +
description | ++ | The displayed permission description. It should help user to determine what the permission is doing. It must be a translation token. | +
division | ++ | It will show a "category" icon to help user figures what will be impacted by the permission. Value can be one of military , assets , financial , industrial . |
+
gate | ++ | If you need to manage your permission with a custom policy, you can provide a policy FQCN. | +
The definition key (sheet
, intel
, planetary
in the upper sample) will be used as permission unique identifier by the system. This is the one stored in the database, together with scope.
Info
+By default, if no gate are provided, those shipped in core will be used according to this pattern :
+You'll find policy sample at this location.
+In SeAT 4, a permission is made of a scope and an ability. The ability is defined by the permissions configuration file and the scope is defined on registration.
+This config file is then loaded from your app service provider as below:
+ +For our API package, we have a database requirement. We need to store api tokens and the ip address that is allowed to use them. We are also going to store an access log (based on the config setting). We create migrations and models just like you would for a base Laravel 6 application. The only thing to remember is that your migrations for your package must be published (and specified in your service provider).
+Registering these migrations looks like the following:
+ +The usual setup is to host the code on github and distribute the code via packagist.
+When you submit your plugin on packagist, it will be installable like the other plugins by adding <vendor>/<package>
to the appropriate section of your .env
file.
SeAT has a REST API. Endpoints are protected by an access token that is limited by IP address. For every IP address that wants to make API requests to SeAT, a unique token is required. API Tokens have no concept of ACL's. The API should primarily be used for integrations with other systems.
+Currently, all API endpoints live at <seat url>/api/<version>
where <seat url>
is the full url to your SeAT instance and <version>
is the API version you wish to interact with.
Since SeAT 3.0, API documentation is generated from source code annotations and presented via a Swagger UI. As a result, endpoint documentation is now directly available on your instance at the following address <seat url>/api/documentation
. A link to the documentation is also provided on the API key management page available to users with the Superuser role.
Swagger JSON
+If you get an error when viewing the API documentation that complains about a file called api-docs.json
, make sure that you ran the php artisan l5-swagger:generate
command as part of the installation and upgrade routines.
Authentication to the SeAT API is done via a X-Token
header. A token may be obtained by browsing to the API settings page in the SeAT WebUI and generating one. A sample request using curl
with an authentication token can be seen below:
Make sure you specify the Accepted content-type header as application/json
. When using cURL
, you can specify it with -H
Example:
+If you don't do this, the API will respond with a redirect and not give you the expected content.
+All SeAT API responses will include the appropriate HTTP response codes. You should check this for error handling purposes. Some sample response codes could be:
+Code | +Status | +Description | +
---|---|---|
200 | +OK | +The request was successful. | +
404 | +Not Found | +The requested endpoint could not be found. | +
422 | +Unprocessable Entity | +Typically, input validation has failed. The response json should contain the errors. | +
500 | +Internal Server Error | +Something bad has happened. Check the server and Laravel log files for more details. | +
This page aims to help with porting a SeAT plugin to a newer version of seat.
+SeAT 5 mainly upgrades the php and laravel version as well as all dependencies to their newest version. However, there are a few other breaking changes that can't be ignored.
+seatcore::
. For example, notifications.integrations.list
turns into seatcore::notifications.integrations.list
. If your plugin uses routes pointing to the seat core, you will have to update them.Seat\Eveapi\Jobs\Middleware\WithoutOverlapping
job middleware backport is now provided by laravel and got removed from the SeAT core. Use Illuminate\Queue\Middleware\WithoutOverlapping
instead. Just swapping the import should be enough, as they are compatible.MyJob::dispatchNow()
got replaced with MyJob::dispatchSync()
If you're upgrading a SeAT 3.x plugin, the cheat sheet bellow will probably helps you.
+SeAT 3.x | +SeAT 4.x | +Purpose | +
---|---|---|
auth()->user() |
+auth()->user() |
+Retrieve the currently authenticated user. | +
auth()->user()->group->main_character |
+auth()->user()->main_character |
+Retrieve the main character from the currently authenticated user. | +
auth()->user()->group->main_character->name |
+auth()->user()->name |
+Retrieve the main character name from the currently authenticated user. | +
auth()->user()->group->characters |
+auth()->user()->characters |
+Retrieve all characters from the currently authenticated user. | +
auth()->user()->refresh_token |
+CharacterInfo()->refresh_token |
+Retrieve the refresh token attached to a character. | +
auth()->user()->group->refresh_tokens |
+auth()->user()->refresh_tokens |
+Retrieve all refresh tokens attached to authenticated user. | +
Also, if you need it, a table called mig_groups
is available in database containing a list of all converted group into standalone user.
+This table will stay here until next SeAT major update.
Field | +Purpose | +
---|---|
group_id |
+The unique ID from SeAT 3 user group | +
old_user_id |
+The unique ID from SeAT 3 user (match to Character ID) | +
new_user_id |
+The unique ID from SeAT 4 user | +
main_character_id |
+The SeAT 3 registered main character ID - or random from the User Group if none were set | +
Welcome to the SeAT documentation pages!
+This site aims to provide you with useful, technical information about SeAT. Please refer to the index on the side for detailed installation instructions, documentation about SeAT internals and/or development guidelines!
+Contributing to Documentation
+Great software is coupled with even greater documentation. If you would like to contribute to making this documentation even better, please don't hesitate to fork the documentation repository and submit a pull request with your contribution. We are always looking for better information.
+There are many ways to install SeAT. In all cases you will need a dedicated server as a minimum. +Using the docker installation you are free to choose any Docker capable host (yes, even Windows!). +However, if you choose to install SeAT on bare metal, you'll need a linux distribution. +We suggest you choose an LTS version of Ubuntu, Debian or CentOS.
+Ignoring the details, to get SeAT installed quickly you have a few options. +All of them will get you SeAT installed, but you still have to manually configure an SSO application on the EVE Online Developers Portal.
+Method | +Comments | +
---|---|
Docker | +Follow our docker installation guide. This is the recommended way to install SeAT as it will handle near everything for you. | +
Manually | +You can always install SeAT by following our manual installation guide. All you need is PHP, MariaDB, Redis and a web server and some Linux experience. | +
Warning
+While installing SeAT - choose one method, and stick to it. Otherwise, you'll get SeAT installed multiple times.
+SeAT is being worked on continuously. New features are added, performance improvements are made and bugs are fixed. If you wish to upgrade to the latest version of SeAT refer to the upgrade section.
+Want to get in touch with developers, or just other users of SeAT? Refer to the contact section to find out how!
+ + + + + + + + +Docker is ideally the installation route you want to go. Docker enables us to run SeAT on any platform capable of running docker itself (which includes Windows!). Additionally, upgrades and service maintenance are really low effort as you don't have to care about any dependencies. All of it is maintained within a docker stack, DockerHub and the GitHub Container Registry.
+Windows owner recommendation
+If you plan on running Docker on Windows, for the best performance it is suggested that you run Docker using the Windows Subsystem for Linux 2 (WSL2) backend, available starting in Windows 10/Windows Server 20H1 (build 2004) releases.
+Windows owner special installation path
+If you are using Docker on Windows, you will need to use the Manual Deployment option below.
+Tip
+Before starting the installation process, be sure you read this complete document first. It will help you understand all the steps from an installation process.
+If you feel like docker might not be your cup of tea, checkout some of the other getting started guides that are available.
+Eve Application and ESI
+SeAT uses CCP's ESI service in order to retrieve EVE Online-related information. Before you can make any authenticated calls to ESI, you have to register a third-party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
+The setup for SeAT's docker installation orchestrated using docker-compose. With docker-compose, we can use YAML
files to define the entire stack complete with all the dependencies required to run SeAT. A pre-built and recommended compose file (which is also used by the bootstrapping script) is hosted in the seat-docker repository here.
The official SeAT repository for Docker is shipped with a total of 4 YAML
files, allowing you both flexibility and understandability of the overall stack. A high-level overview of its contents is:
docker-compose.yml
file in which are listed SeAT services (front
to serve web ui, worker
to process jobs, scheduler
to manage repetitive tasks and cache
to store jobs queue)docker-compose.mariadb.yml
file in which is listed a mariadb
service - this way, you can replace mariadb by another supported database enginedocker-compose.traefik.yml
file in which is listed a traefik
service - this way you can simply and safely server your SeAT frontend to the rest of the worlddocker-compose.proxy.yml
file in which is adapted front
SeAT container to be server behind a reverse proxy of your choicemariadb-data
and seat-storage
is defined. These are the most important volumes as they contain all SeAT data. You should configure a backup solution for them!.env
file.tcp/8080
. It can be connected to in order to access the SeAT web interface.tcp/80
and tcp/443
are exposed and tcp/8080
remain unbound.The table bellow is listed overall consumed Docker image, including SeAT custom one - together with their source repository.
+Image Name | +Image Repository | +
---|---|
mariadb:10.11 |
+https://hub.docker.com/_/mariadb/ | +
redis:5-alpine |
+https://hub.docker.com/_/redis/ | +
traefik:2.10 |
+https://hub.docker.com/_/traefik | +
ghcr.io/eveseat/seat:5 |
+https://github.com/eveseat/seat-docker/pkgs/container/seat | +
Depending on whether you already have docker
and docker compose
already installed, you may choose how to start the installation. If you already have the required tooling installed and running their latest versions, all you need to do is download the latest SeAT Docker template archive to get started.
If you do not have the required software installed yet, consider running the bootstrap script that will check for docker
and docker compose
, install it and start the SeAT stack up for you. The script can be run with:
Once the script is finished, you can skip to the monitoring the stack section of this guide.
+If you don't want to run this script, follow along in the next section of this guide.
+If you do not have docker
, install it now.
Under Linux, you can achieve this action by using the following command as root
:
Under Windows, you can achieve this action by downloading and installing Docker Desktop.
+If you do not have docker compose
, install it now with the following command as root
(Docker Compose is included with Docker Desktop on Windows):
With docker
and docker compose
ready, create yourself a directory in /opt
with mkdir -p /opt/seat-docker
and cd
to it. Remember this directory as you will need to come back to it often.
On Windows, create the C:\seat-docker
directory with mkdir C:\seat-docker
and cd
to it.
Then, download the SeAT Docker template archive with:
+Next, decompress the template archive:
+Next, we will generate a unique application key - this is used internally for encryption:
+Open up the .env
file in a text editor and fill in a few of the configuration items needed.
PROXY_BACKEND_HTTP_PORT
adapt to any integer of your convenience between 1 and 65535 in case you plan to serve SeAT behind a reverse proxy.TRAEFIK_ACME_EMAIL
adapt with your own e-mail address in case you plan to serve SeAT behind Traefik.SEAT_DOMAIN
should be set to the domain your installation lives on and on which SeAT UI will be served. DB_PASSWORD
must be adapt with a strong password of your own - it will be used as SeAT credential for its database.Warning
+The DB_PASSWORD
value have to and must be changed only once - before any start of the overall stack.
+As soon as the database container is created, SeAT user account is initialized with the DB_PASSWORD
value.
+Changing it after the initial startup will prevent the stack to boot.
Also, at the initial startup, the root password from the database container will be shown in logs. +You should consider taking a note of it - otherwise you will no longer have a way to recovery of a critical outage (ie: misconfiguration, etc...)
+Finally, in case you plan to serve SeAT using Traefik, create an ACME configuration file with:
+ +Info
+SeAT docker template is shipped with Traefik to hide your container behind a proxy and securing traffic up to it. In case you want to manage traffic proxying and certification on your own, you must use docker-compose.proxy.yml
file on startup.
Warning
+The location of the docker-compose.yml
and .env
files are important. You need to cd
back to the directory where these are stored in order to be able to execute commands for this stack at a later stage.
Also, be sure you provide a valid e-mail address as it will be used to register your account against Let's Encrypt in case you plan to serve SeAT with Traefik. For those unfamiliar with this, it's CA that provides valid certificates for free.
+As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions on how to do this, please refer to the ESI Setup Guide.
+With the configuration files ready, start up the stack with:
+Knowing what is going on inside your containers is crucial to understanding how everything is running as well as useful when debugging any problems that may occur. While the containers are starting up or have been running for a while, you can always cd
to the directory where your docker-compose.yml
file lives and run the logs
command to see the output of all the containers in the stack. For example:
These commands will cd
to the directory containing the stacks docker-compose.yml
file and run the logs
command, showing the last 10 log entries and then printing new ones as they arrive. If you leave away the --tail 10
part, you can view all logs since the container startup.
All the relevant configuration lives inside the .env
file, next to your docker-compose.yml
file. Modify their values by opening it in a text editor, making the appropriate changes, and saving it again.
+Once that is done, restart the container environment:
Success
+You made it! Use a browser and browse to the domain / subdomain of your server to access SeAT!
+This guide attempts to explain how to manually install SeAT onto an Ubuntu Server. +A small amount of Linux experience is preferred when it comes to this guide, although it is not entirely mandatory.
+Info
+This guide has been written targetting Ubuntu. However, you can use it to deploy SeAT on any linux distribution. +Just be sure you adapt commands to targetted distribution (mostly those related to the package manager).
+Hint
+Before starting to do anything, be sure you read the complete workflow once. +It will help you to understand all steps from the installation process.
+Eve Application and ESI
+SeAT consumes CCP's ESI service in order to retrieve EVE Online related information. +Before you can make any authenticated calls to ESI, you have to register a third party EVE application on the developers portal. +This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
+We are going to assume you have root access to a fresh Ubuntu Server. +Typically access is gained via SSH. +All of the below commands are to be entered in the SSH terminal session for the installation & configuration of SeAT. +If the server you want to install SeAT on is being used for other things too (such as hosting MySQL databases and or websites), then please keep that in mind while following this guide.
+Packages are installed using the aptitude
package manager as the root
user.
Before we get to installing SeAT, lets ensure that your operating system is up to date. We can do that with basics :
+apt-get update
to refresh the repositories cache.apt-get full-upgrade
to update any installed packages.reboot
in order to ensure any updated software is the current running version.apt-get autoremove
(after the reboot) to cleanup any unneeded packages.SeAT relies heavily on a database to function. Everything it learns is stored here, along with things such as user accounts for your users. +It comes without saying that database security is a very important aspect too. So, ensure that you choose very strong passwords for your installation where required.
+SeAT officially supports just MariaDB. Using MySQL or PostreSQL might appear to work on the surface, however it is likely that you will run into issues due to differences between the databases later down the line, and almost no testing with them is done during development.
+We need to ensure that we have the latest MariaDB installed. To help with this, MariaDB provides an official repository to get the latest versions.
+To download and install the repo, you need curl
. Install it with:
Let's add this repository with:
+ +With the repository now setup, lets install the database server:
+Warning
During the installation, you may be asked to set a password for the root
MariaDB user account.
+Make sure you set a long, strong password and remember it. It will be needed for the next step.
Before we can configure the database, we have to start it:
+ +Next, we are going to secure the database server by removing anonymous access and setting a root
password (if you have not been prompted for it yet).
Note
+The database root
password should not be confused with the operating systems root
passwords. They are both completely different.
+They should also not have the same password.
To secure the database, run:
+ +This will ask you a series of questions where you should generally just answer yes to. If you already set a root
password in the previous step then you dont have to set it again, otherwise, make sure you choose a long, strong password for the root
account. An example run is shown below:
That concludes the installation of the database server and securing it.
+Next, we need to create an actual user and database for SeAT to use on the newly installed server. To do this we use the mariadb
command line client and enter a few commands as the root
user to create the database and the user that will be accessing the server. Let get to it.
Fire up the mariadb
client as root by running:
This will prompt you for a password. Use the password you configured for the root
account when we ran mysql_secure_installation
. This will most probably be the last time you need to use this password :)
If the password was correct, you should see a prompt similar to the one below:
+Create a new database for SeAT to use with:
+ +The output should be similar to the below:
+ +Next, we need to create the user that SeAT itself will use to connect and use the new seat
database:
Of course, you need to replace s_p3rs3c3r3tp455w0rd
with your own unique and strong password.
+Successfully running this should present you with output similar to the below:
In the example above, we have effectively declared that SeAT will be using the database as seat:s_p3rs3c3r3tp455w0rd@localhost/seat
.
Finally, we will flush the database server privileges:
+ +That concludes the database server setup. You can exit the prompt with exit
;
Note
+Remember the password for the seat
database user as we will need it later to configure SeAT.
Since SeAT is written primarily in PHP, we will need to install PHP packages. Ubuntu based systems can make use of the ondrej PPA which is a very popular repository used for specific PHP versions.
+Depending on the version of Ubuntu you are using, a release specific repository URL should be used for the PPA. Select the tab applicable to your Ubuntu version and run the commands within.
+Next, we will have to download the new repositories GPG signing key and add it into our keychain
+ +With the new repository configured, update the package lists with:
+ +Finally, install the required PHP packages with:
+SeAT makes use of Redis as a cache and message broker for the Queue back end. Installing it is really easy. Do it with:
+ +Hint
+By default, redis is making backup from its database - so it ensure integrity in case of failure. +However, in certain condition, like power outage, this backup might be unprocessable and avoid redis to run.
+Since we don't store anything critical in it, you may want to disable this. To do so, edit the configuration file
+using nano /etc/redis/redis.conf
and search line appendonly no
, change it for appendonly yes
If you are on a small server, You may also want to limit the part of memory used by redis (by default, it will consume all available memory).
+To do so, into the redis configuration file, search line # maxmemory <bytes>
and change it for maxmemory xGB
where x
is the memory limit you want to set.
You might also need to start redis: +
+Excellent progress! All of the operating system level requirements are now met and we are almost ready to install SeAT itself. The only thing that is outstanding is the package manager called composer
as well as the git
client. The combination of composer
and git
will let us download the SeAT source code from Github and install it locally.
Install git
with:
Next, install composer
with:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && hash -r
+
Thats it. Lets install SeAT! By default, we suggest you run SeAT from within /var/www/seat
. As part of the installation, the seat
directory will be created for us, but we will need to create /var/www
for now as we have not yet configured the web server.
Create the www
directory with:
Next, cd
to the new /var/www
directory with:
With all of the prerequisites installed as well as our www
directory ready we can finally download SeAT. Do that with:
Once the download is done, you should have seen output such as:
+Writing lock file
+Generating optimized autoload files
+> Illuminate\Foundation\ComposerScripts::postAutoloadDump
+> @php artisan package:discover
+Discovered Package: darkaonline/l5-swagger
+Discovered Package: eveseat/api
+Discovered Package: eveseat/console
+Discovered Package: eveseat/eveapi
+Discovered Package: eveseat/notifications
+Discovered Package: eveseat/services
+Discovered Package: eveseat/web
+Package manifest generated successfully.
+> @php artisan key:generate
+Application key [base64:CmhqYNkaIcHo8nYC8LiEWa3U5/+BiTLih5dZftxlV2k=] set successfully.
+
You may have noticed a warning about composer
running as root
. For now this can be safely ignored. Post the installation of the SeAT source code, we need to fix up the permissions of the downloaded files. Do that with:
This will ensure that the web server, cron jobs and workers have access to the source code as well as logs.
+With SeAT downloaded, we need to configure it. There are a number of configuration tasks needed. These include editing the applications .env
file as well as running some commands that setup and seed the database. A configuration value reference can be found here.
The first task would be to configure the applications database connection. Open the file located at /var/www/seat/.env
with something like vi
or nano
and update the database options with your values. Typically, only the password would really need to be updated. If you are making use of an existing database somewhere else over the network, update the applicable fields such as DB_HOST
accordingly.
Next we need to publish the database migrations and web assets (such as JavaScript scripts and CSS Style sheets), run those migrations and finally seed the SeAT job schedule.
+Publish the assets and database migrations with:
+ +Run the database migrations with:
+ +Seed the SeAT schedule with:
+sudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\Services\\Database\\Seeders\\PluginDatabaseSeeder'
+
SeAT makes use of a number of tables from the EVE Static Data Exports. MariaDB conversions of this data is available at https://www.fuzzwork.co.uk/dump/ and used in SeAT.
+To update to the latest SDE within SeAT, run:
+ +The jobs ecosystem within SeAT requires a process supervisor to ensure that the job runner stays alive. The job runner itself is implemented using Laravel Horizon and is monitored using supervisord.
+To configure the Horizon process monitor, first install supervisor
:
Next, we will create a dedicated configuration file which will ask supervisor to keep an eye on Horizon. This file will live in /etc/supervisor/conf.d/seat.conf
. Create this file with its recommended configuration with:
Finally, reload supervisor to apply the new configuration with the following command:
+ +A crontab entry is needed for SeAT. While simple in implementation, this crontab entry simply helps the application invoke a job checker very minute. The actual schedule is stored within SeAT itself and managed entirely via the Web Interface.
+To configure the crontab entry required for SeAT, run the following commands:
+ +Next, add this crontab for the www-data
user with:
If you want to confirm that the crontab successfully installed, you can check it with crontab -u www-data -l
.
Almost there!
You almost made it to the end! Just one more step.
+ +The SeAT web interface requires a web server to serve the HTML goodies it has. We highly recommend you to use nginx
and will be covered in this document. You don't have to use it, so if you prefer something else, feel free.
Together with an nginx
installation we also need to install php-fpm
to handle the PHP execution for us. Let's install nginx
and php-fpm
with:
With the webserver installed, we need to configure nginx
to serve SeAT. For that, a configuration file needs to be created that will tell nginx
where to find php-fpm
as well as where the assets are for SeAT.
The configuration file will live at /etc/nginx/sites-available/seat
. It can be created with the following command:
Warning
+The code block above should not be copied directly into a file. It is a script and should be pasted directly into the linux terminal. It will create the nginx config for you. If you create the file yourself with the above content then the file will not be valid and you will receive errors from nginx.
+The configuration file as is at /etc/nginx/sites-available/seat
itself won't be loaded by nginx
yet. Storing configuration files in a *sites-available*
directory is simply a convention used to allow administrators to quickly add & remove sites if needed. To apply the changes made by the new configuration file it needs to be symlinked to a *sites-enabled*
directory.
Let's symlink to the new configuration and drop the default one as a hardening exercise at the same time:
+Finally, reload nginx
and php-fpm
for the new changes to take affect:
As mentioned at the start of the guide, it is necessary for you to configure ESI. +For instructions how to do this, please refer to the ESI Setup Guide.
+Info
+You may want to serve your SeAT installation over SSL (using HTTPS) - which is a recommanded behavior. +There are many way to do it, you can have a look on Let's Encrypt which provide you valid certificates for free. +Put an eye to their Certbot Documentation.
+Success
+You made it! Use a browser and browse to the IP address / hostname of your server to access SeAT!
+Docker is ideally the installation route you want to go. Docker enables us to run SeAT on any platform capable of running docker itself (which includes Windows!). Additionally, upgrades and service maintenance are really low effort as you don't have to care about any dependencies. All of it is maintained within a docker stack and dockerhub.
+Info
+If you plan on running Docker on Windows, for the best performance it is suggested that you run Docker using the Windows Subsystem for Linux 2 (WSL2) backend, available starting in Windows 10/Windows Server 20H1 (build 2004) releases.
+Hint
+Before starting the installation process, be sure you read this complete document first. It will help you understand all of the steps from an installation process.
+If you feel like docker might not be your cup of tea, checkout some of the other getting started guides that are available.
+Warning
+If you are using Docker on Windows, you will need to use the Manual Deployment option below.
+Eve Application and ESI
+SeAT used CCP's ESI service in order to retrieve EVE Online-related information. Before you can make any authenticated calls to ESI, you have to register a third-party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
+The setup for SeAT's docker installation orchestrated using docker-compose. With docker-compose, we can use a single docker-compose.yml
file to define the entire stack complete with all of the dependencies required to run SeAT. A pre-built and recommended compose file (which is also used by the bootstrapping script) is hosted in the seat-docker repository here.
The previously mentioned compose file is really simple. A high-level overview of its contents is:
+seat-network
is defined. All containers are connected to this network and is used as the primary means for inter-container communications.mariadb-data
is defined. This is the most important volume as it contains all of the database data. This is the one volume that you should configure a backup solution for!Image Name | +Image Repository | +
---|---|
mariadb:10 |
+https://hub.docker.com/_/mariadb/ | +
redis:5-alpine |
+https://hub.docker.com/_/redis/ | +
traefik:2.2 |
+https://hub.docker.com/_/traefik | +
eveseat/seat |
+https://hub.docker.com/r/eveseat/seat | +
.env
file (not to be confused with the SeAT specific .env
file.tcp/80
and tcp/443
. These can be connected to in order to access the SeAT web interface.Depending on whether you already have docker
and docker-compose
already installed, you may choose how to start the installation. If you already have the required tooling installed and running their latest versions, all you need to do is download the latest docker-compose.yml
and .env
files to get started.
If you do not have the required software installed yet, consider running the bootstrap script that will check for docker
and docker-compose
, install it and start the SeAT stack up for you. The script can be run with:
Once the script is finished, you can skip to the monitoring the stack section of this guide.
+If you don't want to run this script, follow along in the next section of this guide.
+If you do not have docker
, install it now with the following command as root
:
If you are on Windows, download and install Docker Desktop.
+If you do not have docker-compose
, install it now with the following command as root
(Docker Compose is included with Docker Desktop on Windows):
With docker
and docker-compose
ready, create yourself a directory in /opt
with mkdir -p /opt/seat-docker
and cd
to it. Remember this directory as you will need to come back to it often.
On Windows, create the C:\seat-docker
directory with mkdir C:\seat-docker
and cd
to it.
Then, download the docker-compose.yml
file with:
Next, download the docker .env
file with:
Next, we will generate a unique application key - this is used internally for encryption:
+Open up the .env
file in a text editor and fill in a few of the configuration items needed.
TRAEFIK_DOMAIN
should be set to the base domain your installation lives on.
+SEAT_SUBDOMAIN
sould be the subdomain for the SeAT web UI. eg: seat.domain.local
For TLS configuration, you need to set the TRAEFIK_ACME_EMAIL
value, and then in the docker-compose.yml
file uncomment the labels that relating to certResolver
. They typically look like this: traefik.http.routers.api.tls.certResolver=primary
. Finally, create an ACME configuration file with:
Info
+SeAT docker template is shipped with Traefik to hide your container behind a proxy and securing traffic up to it. In case you want to manage traffic proxying and certification on your own, you can disable traefik container from the stack by adding #
[front of lines] from the docker-compose.yml
file.
Warning
+The location of the docker-compose.yml
and .env
files are important. You need to cd
back to the directory where these are stored in order to be able to execute commands for this stack at a later stage.
Also, be sure you provide a valid e-mail address as it will be used to register your account against Let's Encrypt. For those unfamiliar with this, it's CA that provides valid certificates for free.
+As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions on how to do this, please refer to the ESI Setup Guide.
+With the configuration files ready, start up the stack with:
+ +Knowing what is going on inside of your containers is crucial to understanding how everything is running as well as useful when debugging any problems that may occur. While the containers are starting up or have been running for a while, you can always cd
to the directory where your docker-compose.yml
file lives and run the logs
command to see the output of all of the containers in the stack. For example:
These commands will cd
to the directory containing the stacks docker-compose.yml
file and run the logs
command, showing the last 10 log entries and then printing new ones as they arrive.
All of the relevant configuration lives inside the .env
file, next to your docker-compose.yml
file. Modify their values by opening it in a text editor, making the appropriate changes, and saving it again. Once that is done, run docker-compose up -d
again to restart the container environment.
Success
+You made it! Use a browser and browse to the domain / subdomain of your server to access SeAT!
+This guide attempts to explain how to manually install SeAT onto an Ubuntu Server. +A small amount of Linux experience is preferred when it comes to this guide, although it is not entirely mandatory.
+Info
+This guide has been written targetting Ubuntu. However, you can use it to deploy SeAT on any linux distribution. +Just be sure you adapt commands to targetted distribution (mostly those related to the package manager).
+Hint
+Before starting to do anything, be sure you read the complete workflow once. +It will help you to understand all steps from the installation process.
+Eve Application and ESI
+SeAT consumes CCP's ESI service in order to retrieve EVE Online related information. +Before you can make any authenticated calls to ESI, you have to register a third party EVE application on the developers portal. +This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
+We are going to assume you have root access to a fresh Ubuntu Server. +Typically access is gained via SSH. +All of the below commands are to be entered in the SSH terminal session for the installation & configuration of SeAT. +If the server you want to install SeAT on is being used for other things too (such as hosting MySQL databases and or websites), then please keep that in mind while following this guide.
+Packages are installed using the aptitude
package manager as the root
user.
Before we get to installing SeAT, lets ensure that your operating system is up to date. We can do that with basics :
+apt-get update
to refresh the repositories cache.apt-get full-upgrade
to update any installed packages.reboot
in order to ensure any updated software is the current running version.apt-get autoremove
(after the reboot) to cleanup any unneeded packages.SeAT relies heavily on a database to function. Everything it learns is stored here, along with things such as user accounts for your users. +It comes without saying that database security is a very important aspect too. So, ensure that you choose very strong passwords for your installation where required.
+This document describes using MariaDB, but you can use MySQL as well. Just double check the requirements.
+We need to ensure that we have the latest MariaDB installed. To help with this, MariaDB provides an official repository to get the latest versions. +Let's add this repository with:
+ +With the repository now setup, lets install the database server:
+Warning
During the installation, you may be asked to set a password for the root
MariaDB user account.
+Make sure you set a long, strong password and remember it. It will be needed for the next step.
Next, we are going to secure the database server by removing anonymous access and setting a root
password (if you have not been prompted for it yet).
Note
+The database root
password should not be confused with the operating systems root
passwords. They are both completely different.
+They should also not have the same password.
To secure the database, run:
+ +This will ask you a series of questions where you should generally just answer yes to. If you already set a root
password in the previous step then you dont have to set it again, otherwise, make sure you choose a long, strong password for the root
account. An example run is shown below:
That concludes the installation of the database server and securing it.
+Next, we need to create an actual user and database for SeAT to use on the newly installed server. To do this we use the mysql
command line client and enter a few commands as the root
user to create the database and the user that will be accessing the server. Let get to it.
Fire up the mysql
client as root by running:
This will prompt you for a password. Use the password you configured for the root
account when we ran mysql_secure_installation
. This will most probably be the last time you need to use this password :)
If the password was correct, you should see a prompt similar to the one below:
+Create a new database for SeAT to use with:
+ +The output should be similar to the below:
+ +Next, we need to create the user that SeAT itself will use to connect and use the new seat
database:
Of course, you need to replace s_p3rs3c3r3tp455w0rd
with your own unique and strong password.
+Successfully running this should present you with output similar to the below:
In the example above, we have effectively declared that SeAT will be using the database as seat:s_p3rs3c3r3tp455w0rd@localhost/seat
.
Finally, we will flush the database server privileges:
+ +That concludes the database server setup. You can exit the prompt with exit
;
Note
+Remember the password for the seat
database user as we will need it later to configure SeAT.
Since SeAT is written primarily in PHP, we will need to install PHP packages. Ubuntu based systems can make use of the ondrej PPA which is a very popular repository used for specific PHP versions.
+Depending on the version of Ubuntu you are using, a release specific repository URL should be used for the PPA. Select the tab applicable to your Ubuntu version and run the commands within.
+Next, we will have to download the new repositories GPG signing key and add it into our keychain
+ +With the new repository configured, update the package lists with:
+ +Finally, install the required PHP packages with:
+SeAT makes use of Redis as a cache and message broker for the Queue back end. Installing it is really easy. Do it with:
+ +Hint
+By default, redis is making backup from its database - so it ensure integrity in case of failure. +However, in certain condition, like power outage, this backup might be unprocessable and avoid redis to run.
+Since we don't store anything critical in it, you may want to disable this. To do so, edit the configuration file
+using nano /etc/redis/redis.conf
and search line appendonly no
, change it for appendonly yes
If you are on a small server, You may also want to limit the part of memory used by redis (by default, it will consume all available memory).
+To do so, into the redis configuration file, search line # maxmemory <bytes>
and change it for maxmemory xGB
where x
is the memory limit you want to set.
Excellent progress! All of the operating system level requirements are now met and we are almost ready to install SeAT itself. The only thing that is outstanding is the package manager called composer
as well as the git
client. The combination of composer
and git
will let us download the SeAT source code from Github and install it locally.
Install git
with:
Next, install composer
with:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && hash -r
+
Thats it. Lets install SeAT! By default, we suggest you run SeAT from within /var/www/seat
. As part of the installation, the seat
directory will be created for us, but we will need to create /var/www
for now as we have not yet configured the web server.
Create the www
directory with:
Next, cd
to the new /var/www
directory with:
With all of the prerequisites installed as well as our www
directory ready we can finally download SeAT. Do that with:
Once the download is done, you should have seen output such as:
+Writing lock file
+Generating optimized autoload files
+> Illuminate\Foundation\ComposerScripts::postAutoloadDump
+> @php artisan package:discover
+Discovered Package: darkaonline/l5-swagger
+Discovered Package: eveseat/api
+Discovered Package: eveseat/console
+Discovered Package: eveseat/eveapi
+Discovered Package: eveseat/notifications
+Discovered Package: eveseat/services
+Discovered Package: eveseat/web
+Package manifest generated successfully.
+> @php artisan key:generate
+Application key [base64:CmhqYNkaIcHo8nYC8LiEWa3U5/+BiTLih5dZftxlV2k=] set successfully.
+
You may have noticed a warning about composer
running as root
. For now this can be safely ignored. Post the installation of the SeAT source code, we need to fix up the permissions of the downloaded files. Do that with:
This will ensure that the web server, cron jobs and workers have access to the source code as well as logs.
+With SeAT downloaded, we need to configure it. There are a number of configuration tasks needed. These include editing the applications .env
file as well as running some commands that setup and seed the database. A configuration value reference can be found here.
The first task would be to configure the applications database connection. Open the file located at /var/www/seat/.env
with something like vi
or nano
and update the database options with your values. Typically, only the password would really need to be updated. If you are making use of an existing database somewhere else over the network, update the applicable fields such as DB_HOST
accordingly.
Next we need to publish the database migrations and web assets (such as JavaScript scripts and CSS Style sheets), run those migrations and finally seed the SeAT job schedule.
+Publish the assets and database migrations with:
+ +Run the database migrations with:
+ +Seed the SeAT schedule with:
+sudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\Console\\database\\seeds\\ScheduleSeeder'
+
SeAT makes use of a number of tables from the EVE Static Data Exports. MySQL conversions of this data is available at https://www.fuzzwork.co.uk/dump/ and used in SeAT.
+To update to the latest SDE within SeAT, run:
+ +The jobs ecosystem within SeAT requires a process supervisor to ensure that the job runner stays alive. The job runner itself is implemented using Laravel Horizon and is monitored using supervisord.
+To configure the Horizon process monitor, first install supervisor
:
Next, we will create a dedicated configuration file which will ask supervisor to keep an eye on Horizon. This file will live in /etc/supervisor/conf.d/seat.conf
. Create this file with its recommended configuration with:
Finally, reload supervisor to apply the new configuration with the following command:
+ +A crontab entry is needed for SeAT. While simple in implementation, this crontab entry simply helps the application invoke a job checker very minute. The actual schedule is stored within SeAT itself and managed entirely via the Web Interface.
+To configure the crontab entry required for SeAT, run the following commands:
+ +Next, add this crontab for the www-data
user with:
If you want to confirm that the crontab successfully installed, you can check it with crontab -u www-data -l
.
Almost there!
You almost made it to the end! Just one more step.
+ +The SeAT web interface requires a web server to serve the HTML goodies it has. We highly recommend you to use nginx
and will be covered in this document. You don't have to use it, so if you prefer something else, feel free.
Together with an nginx
installation we also need to install php-fpm
to handle the PHP execution for us. Let's install nginx
and php-fpm
with:
With the webserver installed, we need to configure nginx
to serve SeAT. For that, a configuration file needs to be created that will tell nginx
where to find php-fpm
as well as where the assets are for SeAT.
The configuration file will live at /etc/nginx/sites-available/seat
. It can be created with the following command:
Warning
+The code block above should not be copied directly into a file. It is a script and should be pasted directly into the linux terminal. It will create the nginx config for you. If you create the file yourself with the above content then the file will not be valid and you will receive errors from nginx.
+The configuration file as is at /etc/nginx/sites-available/seat
itself won't be loaded by nginx
yet. Storing configuration files in a *sites-available*
directory is simply a convention used to allow administrators to quickly add & remove sites if needed. To apply the changes made by the new configuration file it needs to be symlinked to a *sites-enabled*
directory.
Let's symlink to the new configuration and drop the default one as a hardening exercise at the same time:
+Finally, reload nginx
and php-fpm
for the new changes to take affect:
As mentioned at the start of the guide, it is necessary for you to configure ESI. +For instructions how to do this, please refer to the ESI Setup Guide.
+Info
+You may want to serve your SeAT installation over SSL (using HTTPS) - which is a recommanded behavior. +There are many way to do it, you can have a look on Let's Encrypt which provide you valid certificates for free. +Put an eye to their Certbot Documentation.
+Success
+You made it! Use a browser and browse to the IP address / hostname of your server to access SeAT!
+As far as hardware goes, there isn't really a hard and fast rule on what is needed. +The more resources you make available, the faster API updates will occur. +However, there are some minimum recommended specifications.
+Info
+Required CPU cores are indicative and may changes depending on your processor. +They have been based on a one tier deployment (app, workers and database are hosted on the same server).
+To improve accuracy regarding CPU requirements, we provide a Coremark value. +Since Cloud providers like Azure and Google Cloud are providing their instance benchmark using this test, it should give you a more meaningful idea of what we are talking about.
+Warning
+If you intend to process a large amount of data, plan your storage accordingly. +The SeAT database can grow incredibly quickly depending on the amount of tokens you process.
+Due to high I/O traffic generated by SeAT, we recommand NVMe storage usage for best performances.
+Type | +Requirement | +
---|---|
CPU | +2 virtual cores (Coremark 20 000+) | +
Memory | +2GB of RAM with a swap file | +
Core Storage Space | +1GB (tend to be stable) | +
ESI Cache Storage Space | +2GB (tend to grow with characters) | +
Database Storage Space | +5GB (tend to grow with characters and history) | +
Type | +Requirement | +
---|---|
CPU | +2 virtual cores (Coremark 20 000+) | +
Memory | +4GB of RAM | +
Core Storage Space | +1GB (tend to be stable) | +
ESI Cache Storage Space | +5GB (tend to grow with characters) | +
Database Storage Space | +10GB (tend to grow with characters and history) | +
Type | +Requirement | +
---|---|
CPU | +4 virtual cores (Coremark 40 000+) | +
Memory | +8GB of RAM | +
Core Storage Space | +1GB (tend to be stable) | +
ESI Cache Storage Space | +10GB (tend to grow with characters) | +
Database Storage Space | +20GB (tend to grow with characters and history) | +
If you plan to run SeAT for more than 1 000 characters, you will have to fine tune your installation and carefully monitoring it. +At time this documentation is wrote, a standard character is queuing around 50 jobs per wave. +Since all jobs are not doing the same thing, it's difficult to provide you accurate figures.
+A single worker is consuming around 200 MB of memory. Most jobs are requiring less than 5% of CPU - however, a few of them need more than 20% of it. +The more jobs you'll get, the more workers you'll need to process queue in less than 60 minutes.
+Warning
+With such installation, you shouldn't share SeAT server resources with other services. +Also, you should consider deploying database on another server.
+For Docker based installations, all you need is docker
.
+If you already have it installed, check your current version with docker version
.
Type | +Requirement | +Version Check | +
---|---|---|
Docker | +Docker: ^24.0 | +docker -v |
+
Info
+If you plan to deploy SeAT on a Windows host, you will need Docker for Windows
+Warning
+Do not install Docker directly from your distributions repositories. These are usually out of date. +Instead, rather follow the steps provided on dockers official documentation
+When considering a VPS provider, make sure you choose one that does not make use of OpenVZ or similar operating-system level virtualization technologies. These virtualization technologies limit you in terms of kernel access as they purely containerize an existing Linux installation.
+For a successful docker installation, choose a provider that uses para-virtualized technologies such as KVM, VMWare or XEN allowing you full control to the instance (and therefor the kernel itself). Examples of such providers are Digital Ocean, Linode and Vultr.
+Info
+We consider "bare metal", any environment on which SeAT has been deployed manually (instead using containers).
+If you plan to deploy SeAT on a Windows host, you will have to use Docker
+Software version requirements are based on a minimum requirement.
+Type | +Requirement | +State Check | +
---|---|---|
Operating System | +Linux (any distribution is suitable, however, Ubuntu tends to get more up-to-date packages on official repositories). | +Usually, running cat /etc/issue should give you a good idea. |
+
Architecture | +64-bit only | +uname -p |
+
PHP | +PHP: ^8.3 including mysql, gd, bz2, intl, pcntl, gmp, openssl, zip, opcache and redis extensions | +php -v and php -i |
+
Database | +MariaDB: ^10.2.7 | +mysql -V |
+
Caching Service | +Redis | +redis-server -v |
+
Service Supervisor | +Supervisor : 3 | +supervisord -v |
+
Web Server | +NGinX or Apache | +nginx -v or httpd -v |
+
Tip
+In case you want to deploy SeAT with Apache as web server, plan to configure it with Fast CGI using php-fpm instead embedded php process. +Doing it so will make you benefit of significant improved performances.
+Welcome to the SeAT documentation pages!
This site aims to provide you with useful, technical information about SeAT. Please refer to the index on the side for detailed installation instructions, documentation about SeAT internals and/or development guidelines!
Contributing to Documentation
Great software is coupled with even greater documentation. If you would like to contribute to making this documentation even better, please don't hesitate to fork the documentation repository and submit a pull request with your contribution. We are always looking for better information.
"},{"location":"#quick-start","title":"Quick Start","text":"There are many ways to install SeAT. In all cases you will need a dedicated server as a minimum. Using the docker installation you are free to choose any Docker capable host (yes, even Windows!). However, if you choose to install SeAT on bare metal, you'll need a linux distribution. We suggest you choose an LTS version of Ubuntu, Debian or CentOS.
"},{"location":"#installation-options","title":"Installation Options","text":"Ignoring the details, to get SeAT installed quickly you have a few options. All of them will get you SeAT installed, but you still have to manually configure an SSO application on the EVE Online Developers Portal.
Method Comments Docker Follow our docker installation guide. This is the recommended way to install SeAT as it will handle near everything for you. Manually You can always install SeAT by following our manual installation guide. All you need is PHP, MariaDB, Redis and a web server and some Linux experience.Warning
While installing SeAT - choose one method, and stick to it. Otherwise, you'll get SeAT installed multiple times.
"},{"location":"#upgrades-updates","title":"Upgrades / Updates","text":"SeAT is being worked on continuously. New features are added, performance improvements are made and bugs are fixed. If you wish to upgrade to the latest version of SeAT refer to the upgrade section.
"},{"location":"#contact","title":"Contact","text":"Want to get in touch with developers, or just other users of SeAT? Refer to the contact section to find out how!
"},{"location":"community_packages/","title":"Community Packages","text":""},{"location":"community_packages/#community-packages","title":"Community Packages","text":"Below is a list of packages contributed by the community. These packages normally follow the same installation procedure, however, its best you consult the documentation of the package itself in case there is anything special you need to get it working.
"},{"location":"community_packages/#blade-package-installation","title":"Blade package installation","text":"Packages will normally come in the form of a composer package that you need to include in your SeAT install, as well as a Service Provider that you need to bootstrap. So, generically speaking, installing a package will mean that you:
Ensure that you are in the path where you installed. By default, this should be /var/www/seat
.
Put your application into maintenance mode. This will ensure that no request from the outside will hit your applications logic, and also help you perform an upgrade uninterrupted. Do this with the following commands issued as the webserver user:
sudo -H -u www-data bash -c 'php artisan down'\n
sudo -H -u www-data bash -c 'composer require <package vendor>/<package-name>'\n
sudo -H -u www-data bash -c 'php artisan vendor:publish --force --all'\n
sudo -H -u www-data bash -c 'php artisan migrate'\n
sudo -H -u www-data bash -c 'php artisan route:cache'\nsudo -H -u www-data bash -c 'php artisan config:cache'\n
sudo -H -u www-data bash -c 'php artisan seat:cache:clear'\n
sudo -H -u www-data bash -c 'php artisan up'\n
Installing packages like this will ensure that none of the core SeAT packages are affected and you should be free to upgrade SeAT core at anytime.
"},{"location":"community_packages/#docker-package-installation","title":"Docker package installation","text":"Applying community packages to your SeAT instance with Docker requires you to update your .env file located in /opt/seat-docker
and uncommenting SEAT_PLUGINS by removing '#' and entering the package(s) to be installed separating each package with a comma. An example of how to enter packages in your .env would be:
# SeAT Plugins\n# This is a list of the all of the third party plugins that you\n# would like to install as part of SeAT. Package names should be\n# comma seperated if multiple packages should be installed.\nSEAT_PLUGINS=denngarr/seat-fitting,cryptaeve/seat-squad-sync\n
/opt/seat-docker
:docker-compose up -d\n
docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
After running the above command wait for containers affected to rebuild. If SeAT does not come back up refer to Troubleshooting for more insight.
"},{"location":"community_packages/#package-list","title":"Package list","text":""},{"location":"community_packages/#seat-specific-packages","title":"SeAT specific packages","text":""},{"location":"community_packages/#maintained-packages","title":"Maintained packages","text":"Package Version (SeAT 4.x) Version (SeAT 5.x) Installation Description alliancewaw/seat-mumble-register Read the docs This plugin provide an extension to generate a certificate for SeAT user and regist it to mumble server cryocaustik/seat-hr Human Resources plugin for SeAT with Applications (with customized questions per corporation), Blacklist, Intel, Kick History, Notes, and Sheet cryptaeve/seat-squad-sync Adds the ability to sync squad members into filters of permissions cryptaeve/seat-text A module to serve public static ascii, with editing access controlled by seat denngarr/seat-fitting Module to check fittings per character denngarr/seat-srp A module for SeAT that tracks SRP requests h4zz4rddev/seat-buyback A SeAT module for buyback functionality humunuk/alliance-structure-mngmt Add \"Structures\" sub-menu to Alliance page and show all the structures that belong to corps in alliance kassie/calendar Read the docs Calendar plugin pyTonicis/seat-corp-mining-tax Read the docs A Modul to manage corporation mining tax warlof/seat-discord-connector Read the docs A Discord driver to be used withseat-connector
warlof/seat-teamspeak Read the docs A Teamspeak driver to be used with seat-connector
recursivetree/seat-info Read the docs A module that adds a small wiki-like article systems for example as a corporation bulletin.SeAT 5.xYou need to follow special steps after upgrading to retain your resource files. recursivetree/seat-rat A module to monitor ratting usage in a system, e.g. to prevent dropping the bounty risk modifier in nullsec. simplyunnamed/seat-user-last-login Tool to help find potential AFK's in your corporation. recursivetree/seat-billing A billing module to help you with ore and rating taxes. recursivetree/seat-pushx-blamer A module to tell you who's guilty of blocking the PushX queue. recursivetree/seat-alliance-industry A corporation/alliance/coalition industry order marketplace recursivetree/seat-inventory Inventory manager for contracts and corporation hangars. recursivetree/seat-transport This plugin is a calculator for hauling costs, for example for an alliance JF service. recursivetree/seat-mineral-hauling Calculates the most efficient way to move minerals in refined ore form."},{"location":"community_packages/#price-provider-packages","title":"Price Provider Packages","text":"These packages implement different prices sources for the recursivetree/seat-prices-core price provider system. If you are on SeAT 5 and use a plugin that uses recursivetree/seat-prices-core internally, you can install and use any of the following price provider packages.
Price Provider Version Description recursivetree/seat-prices-evepraisal Prices from evepraisal clones recursivetree/seat-prices-evemarketer Prices from evemarketer.com cryptatech/seat-prices-janice Prices from https://janice.e-351.com/ cryptatech/seat-prices-fuzzwork Prices from https://market.fuzzwork.co.uk/"},{"location":"community_packages/#library-packages","title":"Library Packages","text":"These packages provide utilities for other packages and usually don't need to be installed manually.
Package Version Description warlof/seat-connector A generic connector module that handles invites and roles management with any registered platform recursivetree/seat-treelib A module that contains shared code for allrecursivetree/*
plugins recursivetree/seat-prices-core This plugin provides a price provider system for all plugins dealing with prices. Seat 5.x only."},{"location":"community_packages/#deprecated-packages","title":"Deprecated packages","text":"Package Version Description eve-scout/eveseat-oauth2-server This EVE SeAT package enables an OAuth2 server for Single sign-on. flyingferret/seat-whtools A small collection of tools for helping with Wh-Life corporation management, including calculating doctrine stocking levels (based on contracts and denngarr/seat-fitting
plugin), a blue loot tax calculator, and a skill base certificate management. Currently very much a work in progress. freedenizen/eveseat-notes A notes addon for seat 1.x herpaderpaldent/seat-discourse SeAT Discourse enables SeAT to act as SSO provider for your Discourse-Forum instance. Groups and Categories do respect roles of members. With this package you can create hidden sections for your member and public sections for potential recruits to which members get automatically access to. Important: Check installation instructions on Github. herpaderpaldent/seat-groups Module to create auto, open and managed role groups to which user can be automatically be assigned, user can opt-in or user can apply to. herpaderpaldent/seat-notifications This is a fully functional notification package for discord and slack notifications. This package is very easily extendable by other packages and should replace core notifications at some point. Currently seat-groups provide many useful notifications. Notifications are send out by slack or discord bot and uses twice a full oAuth2 authentication of the user. warlof/seat-migrator A migration script between SeAT 2 and SeAT 3 warlof/seat-slack-sso Slack SSO integration for seat 2.x warlof/eveseat-mining-ledger ESI capability that provides a mining ledger to SeAT 2.x warlof/slackbot A slack bot that handles invites and kicks based on an api key"},{"location":"community_packages/#other-seat-related-packages","title":"Other SeAT related packages","text":"Danger
Packages after this message are provided as history and idea database. They will not work on the stable version since they are non longer maintained by their author or have been integrated in core.
Sometimes it can be useful to install a version different from the latest version, for example if you want to install an older version of a plugin or if you want to test a bugfix. The easiest way to find all available versions is to go to the packagist site of the plugin by clicking on the version in the available plugins list. On packagist, if you scroll down, to the right you will find a list of all available versions.
BladeDocker (SeAT 4.x)Docker (SeAT 5.x - using Traefik)Docker (SeAT 5.x - using proxy)Follow the normal installation steps, but change the composer require
command to include the package according to the following example:
sudo -H -u www-data bash -c 'composer require <package vendor>/<package-name>:<version-name>'\n
In your .env
file, add the version to the package like this:
SEAT_PLUGINS=<vendor>/<package>:<version>,cryptaeve/seat-squad-sync:4.0.2\n
Next, restart the stack as usual. docker-compose down\ndocker-compose up -d\n
In your .env
file, add the version to the package like this:
SEAT_PLUGINS=<vendor>/<package>:<version>,cryptaeve/seat-squad-sync:4.0.2\n
Next, restart the stack as usual. docker-compose down\ndocker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
In your .env
file, add the version to the package like this:
SEAT_PLUGINS=<vendor>/<package>:<version>,cryptaeve/seat-squad-sync:4.0.2\n
Next, restart the stack as usual. docker-compose down\ndocker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
"},{"location":"styling/","title":"Styling","text":""},{"location":"styling/#styling","title":"Styling","text":"By default, SeAT uses Bootstrap 3 and the Admin LTE template.
You may want to customise SeAT design to match either your corporation or alliance colours.
To do so, you can use two available css hooks :
custom-layout-mini.css
used by the sign-in pagecustom-layout.css
used by all the entier application, globallyBoth files must be located into your public
directory.
Example
Using the default base directory, you'll get the following path : - /var/www/seat/public/custom-layout-mini.css
- /var/www/seat/public/custom-layout.css
These files are loaded automatically if they are detected - you have nothing else to do to enable them.
"},{"location":"styling/#docker-installs","title":"Docker Installs","text":"An example of adding these to your Web UI container is provided below:
Note
Do note the version in docker-compose.yml
and reflect this in your override file otherwise version mismatches will occur.
custom
directory in /opt/seat-docker/
and add files to new directorydocker-compose.override.yml
in /opt/seat-docker/
directorydocker-compose.override.yml
Note: Uncomment the needed file(s) by removing the #
version: \"3.2\"\nservices:\nseat-web:\nvolumes:\n# - /opt/seat-docker/custom/custom-layout-mini.css:/var/www/seat/public/custom-layout-mini.css\n# - /opt/seat-docker/custom/custom-layout.css:/var/www/seat/public/custom-layout.css\n
Once you have placed the files you will need to run docker-compose up -d
for it to take effect.
version: \"3.2\"\nservices:\nfront:\nvolumes:\n# - /opt/seat-docker/custom/custom-layout-mini.css:/var/www/seat/public/custom-layout-mini.css\n# - /opt/seat-docker/custom/custom-layout.css:/var/www/seat/public/custom-layout.css\n
Once you have placed the files you will need to run docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d
for it to take effect.
version: \"3.2\"\nservices:\nfront:\nvolumes:\n# - /opt/seat-docker/custom/custom-layout-mini.css:/var/www/seat/public/custom-layout-mini.css\n# - /opt/seat-docker/custom/custom-layout.css:/var/www/seat/public/custom-layout.css\n
Once you have placed the files you will need to run docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d
for it to take effect.
An example of a customized login page using custom-layout-mini.css
would be:
Note
Valid corporations
or alliances
ids in the URL can be used for login.logo::before
section.
/**\n * SeAT login page layout\n */\n@media all {\nhtml, body {\nheight: auto;\n}\n.login-page, .register.body {\ncolor: rgb(255,255,255);\nbackground-image: url(https://web.ccpgamescdn.com/aws/eveonline/sso/background.jpg);\nbackground-position: center center;\nbackground-repeat: no-repeat;\nbackground-size: cover;\nbackground-attachment: fixed;\n}\n.login-box, .register-box {\nwidth: 360px;\nmargin: 0;\nposition: absolute;\ntop: 50%;\nleft: 50%;\nbackground: rgba(48,48,48,.8);\ntransform: translate(-50%, -50%);\nborder: 5px solid #ecf0f1;\nborder-radius: 40px;\nbox-shadow: 0 1px 1px rgba(0,0,0,0.05);\n}\n.login-logo, .register-logo {\nfont-size: 35px;\ntext-align: center;\nmargin-bottom: 25px;\nfont-weight: 300;\nmargin-top: 50px;\n}\n.login-logo::before, .register-logo::before {\ncontent: \" \";\ndisplay: block;\nwidth: 128px;\nheight:128px;\nmargin: 0 auto;\nbackground-image: url(https://images.evetech.net/corporations/98482334/logo?size=128);\nborder-radius: 50%;\nmargin-bottom: 50px;\n}\n.login-box-body, .register-box-body {\nbackground: transparent;\npadding: 20px;\nborder-top: 0;\ncolor: inherit;\n}\n}\n
The above code will create the login page below:
"},{"location":"troubleshooting/","title":"Troubleshooting","text":""},{"location":"troubleshooting/#troubleshooting","title":"Troubleshooting","text":"So the inevitable happened. Something broke or simply isn't working as expected! That's OK. Usually its possible to recover from almost any type of error. The only thing that you can't recover from is not making database backups!
There are a few things you can do to perform general troubleshooting. These range from flipping SeAT into debug mode to simply running a self diagnostics command. Lets take a look at a few steps you can take:
"},{"location":"troubleshooting/#whoops","title":"Whoops","text":"Whoops, looks like something went wrong.
The dreaded \"Whoops\" message has appeared and now you need to figure out why. Normally, this means that something serious broke and the application simply can't recover by itself. In many cases it could either be a quick fix you can do yourself, or something that could result in the need to fix some code.
In either case, the next steps to perform when seeing this would be to either enable debug mode and reloading the page / request that failed, or by viewing the log file while retrying the failed request.
"},{"location":"troubleshooting/#memory-errors","title":"Memory Errors","text":"Fatal error: Allowed memory size of #### bytes exhausted (tried to allocate 4096 bytes)...
If you are presented with an error below similar to this after \"Updating Dependencies\" you must append your .ENV file with COMPOSER_MEMORY_LIMIT= -1
and restart the stack with the following if you are using docker:
docker-compose up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
Note
Note: spacing is important for this parameter, if you are unsure copy/paste the needed line into your .ENV file.
"},{"location":"troubleshooting/#enabling-debug-mode","title":"Enabling Debug Mode","text":"Debug mode controls how much information about an error condition is displayed to the user. When debug mode is enabled, the error message will be extremely verbose, whereas when its disabled, it simply states that an error had occurred. In either case, the error will always be written to the logs. By default, SeAT does not have debug mode enabled. There are many reasons for this with the primary reason being security related. It goes without saying that once you have completed debugging and fixing your instance, always make sure you disable debug mode afterwards.
Once you have enabled debug mode, any errors that may occur would look something like the following instead of the default \"Whoops\" message. Depending on if you have development packages installed (which you wouldn't by default in non-development installations), the debug page may look slightly different.
Irrespective of how you installed SeAT, enabling debug mode is always a matter of changing the APP_DEBUG
configuration option in the .env
to `true. However, for it to apply depends on how you installed, so follow the appropriate steps below.
Assuming you installed SeAT on your host using either the SeAT tool or manually, cd to your SeAT installation directory. If you followed the guides on this documentation website, that would be in /var/www/seat
. Next, open the .env
file in a text editor and modify the line that says APP_DEBUG=false
to say APP_DEBUG=true
.
The change would immediately take effect and you can simply reload the failed request for a detailed error message and code stack trace.
"},{"location":"troubleshooting/#debug-mode-docker-installs","title":"Debug Mode - Docker Installs","text":"If you installed using Docker, cd to the directory where the docker-compose.yml
file is located. Assuming you followed the guides on this website, that would be in /opt/seat-docker
. Next, open the .env
file in a text editor and modify the line that says APP_DEBUG=false
to say APP_DEBUG=true
.
For the change to take effect, you need to reload the stack:
Docker (SeAT 4.x)Docker (SeAT 5.x - using Traefik)Docker (SeAT 5.x - using reverse proxy)docker-compose up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
The containers will take a few moments to settle down after which you can reload the failed the request for a detailed error message and code stack trace.
"},{"location":"troubleshooting/#checking-log-files","title":"Checking Log Files","text":"Logs are always written to one of two log files irrespective of whether the application is in debug mode or not. Application logs go to the Laravel frameworks log files. API requests sent to ESI are stored int he Eseye log file. Logs are stored in the applications storage directory which can be found in the storage/logs
folder.
Assuming you followed the guides on this documentation site, the full path to the directory where log files are will be /var/www/seat/storage/logs/
. In the case of Docker installations, this will also be the path within the seat-web
/front
or seat-worker
/worker
container. Log files are rotated daily and are kept for a maximum of 10 days by default. Therefore, to get to todays application logs, the log file itself may be called laravel-2018-05-31.log
. To find today's ESI requests logs, the log file will be called eseye-2018-05-31.log
.
Irrespective of which log file you want to look at, getting todays live logs written to screen can be done with the following commands:
Application Logs:
tail -f /var/www/seat/storage/logs/laravel-$(date +%Y-%m-%d).log\n
Esye / ESI Logs:
tail -f /var/www/seat/storage/logs/eseye-$(date +%Y-%m-%d).log\n
"},{"location":"troubleshooting/#live-logs-docker-installs","title":"Live Logs - Docker Installs","text":"Application source code and log files are shared between the seat-web
/front
, seat-worker
/worker
and seat-cron
/scheduler
containers. Therefore, the following commands can be executed on any of those containers. For purposes of demonstration, we are going to tail the logs from the seat-web
/front
container.
First, enter get a shell within the seat-web
/front
container while in the /opt/seat-docker/
directory with:
docker-compose exec seat-web sh\n
docker compose exec front sh\n
Next, tail the log files you want to see.
Application Logs:
tail -f /var/www/seat/storage/logs/laravel-$(date +%Y-%m-%d).log\n
Esye / ESI Logs:
tail -f /var/www/seat/storage/logs/eseye-$(date +%Y-%m-%d).log\n
"},{"location":"troubleshooting/#diagnose-command","title":"Diagnose command","text":"A diagnostics command exists that aims to perform a number of self-checks to help you diagnose problems. This command should be run as the same user the SeAT workers are running as, which is typically either www-data
on Ubuntu / Debian based systems and nginx
on CentOS based systems. If you have created yourself a separate user for SeAT, then running the diagnose command as that user is what you need to do.
Host installs require you to first cd
to the directory where you installed SeAT. If you followed the guides on this website, that would be /var/www/seat
. Next, run the diagnose command as the user you are running the workers as. If you are the root
user, you can run it with:
su -c 'php artisan seat:admin:diagnose' -s /bin/sh www-data\n
"},{"location":"troubleshooting/#diagnose-docker-installs","title":"Diagnose - Docker Installs","text":"For Docker installations, the only requirement to run the diagnose command would be to ensure that you are currently in the same folder as that where the stacks docker-compose.yml
file lives. If you followed the guides on this website that would be in /opt/seat-docker
. Next, run the command with:
docker-compose exec seat-web su -c 'php artisan seat:admin:diagnose' -s /bin/sh www-data\n
docker compose exec front su -c 'php artisan seat:admin:diagnose' -s /bin/sh www-data\n
"},{"location":"about/contact/","title":"Contact","text":""},{"location":"about/contact/#contact","title":"Contact","text":"Have a question? Want to say thank you? Need to express your opinion on SeAT? You are welcome to join us on our official Discord Server! https://discord.gg/VcUZRcnMYK.
"},{"location":"about/contact/#eve-online-forum-thread","title":"EVE Online Forum Thread","text":"Track the conversation on the EVE Online Forums.
"},{"location":"about/reporting_bugs/","title":"Reporting Bugs","text":""},{"location":"about/reporting_bugs/#reporting-bugs","title":"Reporting Bugs","text":"So, you think its time to report an issue. Awesome! However, before you do this, please go through the troubleshooting steps first to identify any common errors that you might be able to to fix yourself.
"},{"location":"about/reporting_bugs/#the-more-info-the-better","title":"The more info, the better","text":"In order to best understand the bug, we need as much info as possible about your environment. For that, you can run the following command (from your SeAT directory), and copy / paste the output as part of your bug report:
php artisan seat:admin:diagnose\n
"},{"location":"about/reporting_bugs/#log-files","title":"Log files","text":"Log files are a fantastic resource. Check out the Laravel log for any Exception
type errors, and add them to your bug report. The log file is located (relative to where you installed SeAT) at:
storage/logs/laravel-<todays-date>.log\n
"},{"location":"about/reporting_bugs/#screenshots-and-debug-mode","title":"Screenshots and debug mode","text":"Screenshots may also help, so don't be shy to take some and attach them to your bug report! If you flip your installation into debug mode then it may be possible to capture the error that is occurring via a screenshot.
"},{"location":"about/reporting_bugs/#report-the-bug","title":"Report the bug","text":"Finally, to report the bug, head over to Github Issues and click on New Issue.
"},{"location":"admin_guides/admin_login/","title":"Admin Login","text":""},{"location":"admin_guides/admin_login/#admin-login","title":"Admin Login","text":"SeAT is heavily relaying on EVE Online Single Sign-On to authenticate user. However, it's also shipped with a built-in administrator user.
You need an admin account in order to do certain tasks like configuring your instances, roles, squads, etc...
In order to authenticate with built-in admin user, use command disclosed bellow (choose your context).
Docker (SeAT 4.x)Docker (SeAT 5.x)Bare metalcd /opt/seat-docker\ndocker-compose exec seat-web php artisan seat:admin:login\n
cd /opt/seat-docker\ndocker compose exec front php artisan seat:admin:login\n
sudo -H -u www-data bash -c 'php /var/www/seat/artisan seat:admin:login'\n
You'll get a link after the command has finished running, which looks similar to the one bellow:
SeAT Admin Login URL Generator\nUser 'admin' does not exist. It will be created.\nChecking if 'admin' is a super user\nAdding 'admin' to the Superuser role\nGenerating authentication token\n\nYour authentication URL is valid for 60 seconds.\nhttp://localhost/auth/login/admin/9G3sb8hjMvrbIJrIf10KKtIj1c8e9mL5\n
Copy it and paste it inside your browser, and you will be authenticated as the built-in admin account.
Hint
You can define a standard user account as an administrator from the user card. To do so, go into Settings > Users, search the user which need to be upgraded and clic on the edit button. On the displaying card, check Administrator and confirm change using edit button.
Warning
If you have not configured the APP_URL
setting in the .env
file, then the admin url will be generated for localhost
. This is most likely incorrect and you can simply replace localhost
with your server IP address or domain name.
SeAT supports configuring user access control by means of Role-based Access Control (RBAC). This allows for SeAT administrators to granularly control who has access to what based on which roles a SeAT user has.
In SeAT, the default rule is to deny access. As a result, someone without a permission will not be able to access the requested resource.
Tip
Use roles to define permission without wondering about automation. You will be able to set up role auto assignment with Squads. The more granular are your roles, the easier they will be to maintain them and built your automation rules.
"},{"location":"admin_guides/authorizations/#definitions","title":"Definitions","text":"This section aims to clear up the definitions used in the SeAT RBAC implementation.
User A SeAT user account. This can be either a user account that was created in SeAT itself, or an automatically created account based on SSO. The only difference between the accounts is that with an SSO account, SeAT has no idea what the account's password is. Otherwise, everything else is exactly the same.
Scope A scope is a domain grouping different permissions related to the same topic. Permissions from certain scope can be limited (ie: character or corporation).
Permission A Permission is an attribute that is assigned to a Role. It grants access based on the specific permission.
Role A Role is simply a collection of permissions. Users get assigned a roles and inherit the permissions granted by that role. A user cannot be given a raw permission. Permissions can only be granted by creating a Role, assigning permissions to the Role and granting the role to a user.
Filters Permissions from certain scope can received filters. That simply mean the granted permission is limited to certain conditions. As an example, you may want to limit the asset permission from character scope to only a selection of character.
Entity An entity is something on which the permission will be applied. It can be a Character, a Corporation or anything else.
To manage roles, you must go into Settings from SeAT sidebar, then choose Access Management.
Info
To be able to manage SeAT roles, you must be authenticated as an administrator user. Administrators can be managed in the users list, located in Settings.
"},{"location":"admin_guides/authorizations/#role-card","title":"Role card","text":"The Role card is compounds of two main area.
Left pane contains basic information. It allows you to provide a name, a description and upload an optional logo. Those information can be sync with any third party platform using the API.
Tip
Provided logo are stored into database - so you don't need to worry when moving your installation.
Right pane contains role settings. The pane is split in two tabs - first tab is showing the role permissions definitions. Second pane, the members one, gives you the current role members and related management actions.
"},{"location":"admin_guides/authorizations/#role-definition","title":"Role definition","text":""},{"location":"admin_guides/authorizations/#role-permissions","title":"Role permissions","text":"The role permissions tab is built using a navigation bar, which is showing all available scopes - and the list of permissions from active scope. Use the scope navigation to show permissions related to each scope.
Each permission block is structured as follow:
military
, financial
and industrial
.Warning
In SeAT 3, leaving the affiliations of a role empty, meant that the role would apply to no relevant entities. It had no effect. This has changed in SeAT 4. If you give a role a permission with no filter, this permission will apply globally to all entities. For example giving the Corporation Sheet permission to a role with no filter means that the members of the role will be able to see the corporation sheets of every corporation on the server.
"},{"location":"admin_guides/authorizations/#role-members","title":"Role members","text":"The role members tab is a table listing all users who are currently assigned the role. All of them receive the benefits of the permissions which have been defined in the permissions tab from that same role. You will be able to add or remove any user to or from the role using action buttons.
To remove an user from the role to which is part, simply click on the \"Remove\" button located on the member line.
To add one or multiple user to the role, use the green \"Add\" button located at bottom right corner. This will show you a dialog box. Use the drop-down control to find users which you want to add. Once all users to be add have been chosen, click on the \"Close\" button located at bottom right corner from that modal. Selected users will be shown with a warning background to highlight their addition to the role. This means their selection isn't saved yet - you have to apply change using the green \"Submit\" button located under the General pane.
"},{"location":"admin_guides/buckets/","title":"Buckets","text":""},{"location":"admin_guides/buckets/#buckets-and-continuous-update","title":"Buckets and continuous update","text":"Starting with eveseat/console@4.7.0 and eveseat/eveapi@4.8.0, a new system has been designed to ensure continuous updates and reduce load on both SeAT stack and ESI.
"},{"location":"admin_guides/buckets/#general","title":"General","text":"Each instance is allowed to get up to 30 buckets. Every bucket will handle a batch of tokens, and their related characters and corporations data update. Size of bucket is dynamically set based on the following criteria :
Info
Most data ESI endpoint and data they deliver are restricted to a 1-hour cache long. However, certain are shorter and benefit of dedicated command to allow you update more frequently - please, do not abuse of them.
esi:update:contracts
esi:update:killmails
esi:update:affiliations
esi:update:notifications
You can determine a bucket status using seat:buckets:list
and seat:buckets:info ID
commands. The first one will show you all existing buckets in the system together with the amount of token they're managing and their status. The second will show you details about a specific bucket including characters they have the charge of.
A bucket can have one of the following status :
Bucket balancing is run every time a token is created or removed from the system. As a result, you may find bucket with a certain amount of token at one time and a completely different one at another.
If you find yourself with unbalanced buckets, you can force them to be balanced using seat:buckets:balance
. However, depending on instance state, certain buckets will not be able to be more balanced for a time (ie: lack of tokens).
This system has been designed to ensure there is a bucket to update every two minutes (except for instances with less than 30 tokens). You can force bucket to be processed and bypass the scheduler using seat:buckets:update
- however, keep in mind that tokens handled by updating bucket will be frozen for the next 60 minutes.
Hint
Manual command to force update character and corporation are still available. They require the ID of a tied character.
esi:update:characters character_id
esi:update:corporations character_id
Occasionally you will need to perform administrative tasks in your SeAT instance running within docker. Be it because you would like to configure TLS for the web interface, change the port of the SeAT webserver or simply generate an admin login URL, this guide aims to help you get familiar for the commands needed for this.
Many of the commands are exactly the same as those used in a bare metal installation, except for the fact that they are always prefixed with docker compose
and run from the same directory that you have the seat docker-compose.yml
file stored. If your docker-compose.yml
lives in /opt/seat-docker
, you will need to cd
to that directory first and then execute the docker compose
commands.
Info
With SeAT 5, we migrated from the docker-compose
command to docker compose
. Besides the name, they are fully compatible. If you are still on SeAT 4, you have to use docker-compose
instead of docker compose
for all actions. This applies to all actions, not just the ones listed on this page.
For a quick, birds-eye view on the status of the containers within the SeAT docker stack, the following command may be run:
SeAT 4.xSeAT 5.xdocker-compose ps\n
docker compose ps\n
This should give you the name, entry point, current status and internal ports used within the docker network as output.
"},{"location":"admin_guides/docker_admin/#configuration-changes","title":"Configuration Changes","text":"A dockerized installation of SeAT is primarily configured via a configuration file located at .env
. Configuration options such as your applications SSO secrets, SeAT's web server ports are amongst the many configuration options available in this file.
Making changes to this file requires the docker stack to be restarted so that the configuration may be applies. An example case would be when you configure SSO for your instance.
Once you have made a configuration change, save the .env
file and restart the stack by simply running the following command from the path where the docker-compose.yml
lives:
docker-compose up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
"},{"location":"admin_guides/docker_admin/#live-container-logs","title":"Live Container Logs","text":"Getting an idea of what is happening inside of the containers may be useful for many things, including debugging any issues that may occur. All of the containers generate logs that can be viewed either in isolation, or all of the containers in the stack.
Docker (SeAT 4.x)Docker (SeAT 5.x)To view a single services' logs (seat-web
in this examples case), run:
docker-compose logs --tail 10 -f seat-web\n
All services can referenced by their name using docker compose
. You can see the service names here. At the time of writing this doc, the available services were: mariadb
, redis
, traefik
, seat-web
, seat-worker
and seat-cron
.
To view a single services' logs (front
in this examples case), run:
docker compose logs --tail 10 -f front\n
All services can referenced by their name using docker compose
. You can see the service names here and in the adjacent docker-compose.x.yml
files. At the time of writing this doc, the available services were: mariadb
, cache
, traefik
, front
, worker
and scheduler
.
To view all service logs at once, run:
Docker (SeAT 4.x)Docker (SeAT 5.x)docker-compose logs --tail 10 -f\n
docker compose logs --tail 10 -f\n
Once you are done viewing the output, simply pressing ^C will exit the log viewer.
"},{"location":"admin_guides/docker_admin/#application-logs","title":"Application Logs","text":"While most processes will output information to stdout (which is what you will see when you run docker-compose logs
), there are some app specific logs also generated.
If you are getting HTTP 500's, or other exception when using the web interface, the best place to find the relevant logs will be in the seat-web
service, in the /var/www/seat/storage/logs
directory. To reach them, run docker-compose exec seat-web bash
. This will drop you into bash shell in the container:
$ docker-compose exec seat-web bash\nroot@9aff5b002ca0:/var/www/seat#\n
If you are getting HTTP 500's, or other exception when using the web interface, the best place to find the relevant logs will be in the front
service, in the /var/www/seat/storage/logs
directory. To reach them, run docker-compose exec front bash
. This will drop you into bash shell in the container:
$ docker-compose exec front bash\nroot@9aff5b002ca0:/var/www/seat#\n
Next, cd to the logs directory with:
cd storage/logs/\n
This directory should have daily log files for you to view.
"},{"location":"admin_guides/docker_admin/#logs-worker-updaters","title":"Logs - Worker / Updaters","text":"Docker (SeAT 4.x)Docker (SeAT 5.x)If you think your workers may be causing some exceptions, or you want to investigate why they may be failing, you can do so in the seat-worker
service. Just like for the web UI, get a bash shell and cd to the logs directory.
# docker-compose exec seat-worker bash\nroot@8ed8967348f1:/var/www/seat# cd storage/logs/\nroot@8ed8967348f1:/var/www/seat/storage/logs# ls\neseye-2020-08-23.log\n
If you think your workers may be causing some exceptions, or you want to investigate why they may be failing, you can do so in the worker
service. Just like for the web UI, get a bash shell and cd to the logs directory.
# docker compose exec worker bash\nroot@8ed8967348f1:/var/www/seat# cd storage/logs/\nroot@8ed8967348f1:/var/www/seat/storage/logs# ls\neseye-2020-08-23.log\n
The eseye log as well as Laravel log should help you debug what is going on.
"},{"location":"admin_guides/docker_admin/#installing-plugins","title":"Installing Plugins","text":"SeAT provides the ability for third party developers to integrate with the core environment to extend its features and functionality. It is possible to install those plugins in a docker environment. Installing a plugin is relatively easy too. All you need to do is add the plugin name to your SEAT_PLUGINS
variable in the .env
file and run docker-compose up -d
again. The plugin will be read from the .env
file and installed as the application container starts.
For example. Open the .env
file (which is most probably at /opt/seat-docker/.env
) and edit the SEAT_PLUGINS
variable to include the package you want to install. In our example we use the pseudo package called user/seat-plugin:
# SeAT Plugins\n# This is a list of the all of the third party plugins that you\n# would like to install as part of SeAT. Package names should be\n# comma separated if multiple packages should be installed.\nSEAT_PLUGINS=user/seat-plugin\n
Save your .env
file and run docker-compose up -d
to restart the stack with the new plugins as part of it. Depending on how big the plugin itself may be, this could take a few moments to complete.
You can monitor the installation process by running:
Docker (SeAT 4.x)Docker (SeAT 5.x)docker-compose logs --tail 10 -f\n
docker compose logs --tail 10 -f\n
"},{"location":"admin_guides/docker_admin/#database-backups-and-restore","title":"Database Backups and Restore","text":"Backups. They are important and really simple to do. To perform a backup of the current database used within the docker stack, compressing and saving it to a file called seat_backup.sql.gz
, run:
docker-compose exec mariadb sh -c 'exec mysqldump \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"' | gzip > seat_backup.sql.gz\n
docker compose exec mariadb sh -c 'exec mysqldump \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"' | gzip > seat_backup.sql.gz\n
To restore a backup to a new dockerized instance of SeAT, run:
Docker (SeAT 4.x)Docker (SeAT 5.x)zcat seat_backup.sql.gz | docker-compose exec -T mariadb sh -c 'exec mysql \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"'\n
zcat seat_backup.sql.gz | docker compose exec -T mariadb sh -c 'exec mysql \"$MYSQL_DATABASE\" -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\"'\n
"},{"location":"admin_guides/scaled_deployments/","title":"Scaled Deployments","text":"DEPRECATED!!!
This guide is deprecated and is not functional in SeAT v3. If you need more performance in SeAT v3 then you have two options, move the DB alone to another server, and/or beef up the server SeAT is running on. This guide may be updated in the future when horizontal scaling is viable again. It is left as is for now due to academic and nostalgic reasons.
"},{"location":"admin_guides/scaled_deployments/#scaled-seat-deployments","title":"Scaled SeAT Deployments","text":"At some stage, you may come to a point where a single install of SeAT might not be enough to process api key updates. Thankfully, it is actually very easy to scale SeAT horizontally in order to improve performance. This document aims to share some need to knows before embarking on a tiered installation of SeAT.
"},{"location":"admin_guides/scaled_deployments/#definitions","title":"Definitions","text":"Lets get some definitions cleared up.
"},{"location":"admin_guides/scaled_deployments/#server","title":"Server","text":"A server is defined as any VPS, hardware, docker container, or other form of virtualization. When talking performance though, keep in mind that there will probably be very little performance gains when everything runs on the same physical hardware instance.
"},{"location":"admin_guides/scaled_deployments/#seat-component","title":"SeAT component","text":"A SeAT Component is a collection of SeAT packages and configurations that is responsible for performing a specific task. Tasks include the SeAT Web Interface, the job workers or dispatchers.
"},{"location":"admin_guides/scaled_deployments/#components","title":"Components","text":"Before we can talk scale, we need to understand which components SeAT actually consists of. We will not talk about the immutable resources here as they will be mentioned in the next section.
So, which components are there to SeAT?
Each of these components can live on their own server and must share the same immutable resources.
"},{"location":"admin_guides/scaled_deployments/#immutable-resources","title":"Immutable resources","text":"While almost every component in SeAT can 'run on its own', there are some services that SeAT consumes that SeAT can not scale itself. Instead, SeAT can consume a clustered or load balanced instance of these services. There are various reasons for this where the most important is that state is maintained between queue workers using Redis and MariaDB.
Services that should be shared between all SeAT components are:
When mentioning these components, they can definitely exist in their clustered/load balanced forms. For Redis, have a look at their Redis cluster tutorial and for MariaDB, you can have a look at their MariaDB cluster installation.
"},{"location":"admin_guides/scaled_deployments/#simple-scaled-setup","title":"Simple scaled setup","text":"The following example setup is probably the most simple option to gain performance improvements by scaling out. The gist of it is that we simply add more queue worker components to the SeAT setup.
Lets start by taking a look at a diagram, showing the extra queue worker component added.
Installing a new server with only the queue worker component setup can bring a significant speed boost into the environment. A new queue worker could be configured to run an extra 4-6 jobs. This queue worker must be configured to make use of the immutable resources.
"},{"location":"admin_guides/scaled_deployments/#more-complicated-scaled-setup","title":"More complicated scaled setup","text":"Of course, one can totally go full nelson and explode all of the components in use. Below is an example deployment (with data flow links, red for redis, blue for MariaDB) that shows how each SeAT component can live on its own server.
"},{"location":"admin_guides/scaled_deployments/#component-setups","title":"Component setups","text":"Lets talk about component configurations quickly. Apart from the immutable resources, all of the software needed can be sourced from SeAT packages. All of the standard requirements such as PHP7.1 and Supervisor 3 also apply. However, not all components would need a web server for example.
Below are the descriptions (and short requirements list) for the different SeAT components.
"},{"location":"admin_guides/scaled_deployments/#web-front-end","title":"Web front end","text":"To setup a web front end component, use the following steps:
public/
directory from the SeAT project.composer
installed and available in PATH
./var/www/seat
using composer create-project eveseat/seat /var/www/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.To setup a queue worker component, use the following steps:
composer
installed and available in PATH
.composer create-project eveseat/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.seat.ini
file for supervisor to start.To setup a job dispatcher component, use the following steps:
composer
installed and available in PATH
./var/www/seat
using composer create-project eveseat/seat /var/www/seat --no-dev
..env
files database and Redis settings to connect to your immutable sources.php artisan schedule:run 1>> /dev/null 2>&1
every minute.Since SeAT 4.0, there is a way to apply automatic logic between an end user and its roles. The purpose is to keep distinct the security and automations.
Squads is the core implementation of the deprecated seat-groups plugin.
"},{"location":"admin_guides/squads/#squads-types","title":"Squads Types","text":"There are multiple kinds of squad. The way they work and the automations they apply depend on their type.
"},{"location":"admin_guides/squads/#automatic","title":"Automatic","text":"This is the simplest squad type. Membership of a squad of this type is controlled by the filters (see below) set for the squad.
A member of an automatic squad cannot remove themselves from the group. If a user no longer fulfils the criteria of the filter set for the squad they will be automatically removed from it.
"},{"location":"admin_guides/squads/#manual","title":"Manual","text":"Manual squads have to be applied to, the processing of the application depends on whether there is a moderator for the group or not.
If there is no moderator the application will be automatically accepted.
If there is at least one moderator they can accept or reject applications.
Filters applied to a squad of this type will have two effects: - hide the \"Apply\" button if the filter criteria are not met - kick the member from the group if the filter criteria are not met
"},{"location":"admin_guides/squads/#hidden","title":"Hidden","text":"Hidden squads are visible exclusively to their members and admins. To be part of a hidden squad, the user needs to be added to it by an admin.
This mean, only admin user can invite another user to a hidden squad.
"},{"location":"admin_guides/squads/#squads-filters","title":"Squads Filters","text":"Filters have different behaviors depending on the Squad Type. In case the Squad is of auto type, filters will be applied continuously to invite and kick members from the Squad - based on user changes.
Otherwise, filters are used to automatically kick members from a Squad and determine the availability of the \"Apply\" button on Squad Card.
Squads Filters have been designed to assist you to build rules which will determine whether a given user is eligible for a Squad. You pair different conditions together and link them with match keywords.
Match keywords can be either All
or Any
. All
mean all conditions must be met by the user for them to be eligible. Any
means that a user is eligible if they meet any of the conditions.
To add a condition, use Add Rule
button located at the end of the modal. In case you have to build a complex rule, use Add Group
which will allow you to pair multiple conditions in a single rule.
Info
Filters come with multiple operators. Not all operators work with all filters. Is
and Is not
are used to indicate either equality with criteria or inequality. Those operators are the most common and work with nearly all filter types. Contains
is used to indicate that criteria must be included in a domain. This operator currently only works with the Scopes
filter.
Example
In the example above, we want only users who own at least one character (inside either Get Off My Lawn OR Toilet Paper. alliances) AND with skill Capital Ships to be eligible for membership in our Squad.
"},{"location":"admin_guides/squads/#squad-applications","title":"Squad Applications","text":"Applications are only available to manual squads.
For a user to be able to apply to a manual squad they need to meed the squads filter criteria. Otherwise, application button will not be available.
If the user applies to a moderated squad, they are required to fill an application form. This will leave you the ability to build workflow internally and allow moderators to check any incoming members. Users can also cancel squad applications at any time using the Cancel button which will replace the Join button.
"},{"location":"admin_guides/squads/#squad-moderators","title":"Squad Moderators","text":"Moderators of a Squad don't need to be part of that squad. They will be able to see a list of every member of each squad they moderate, allowing them to invite further members or kick existing ones.
Squad moderators can also see Squad candidates, the time when they applied and each application form. From there, they can approve an application or reject it.
When an application is approved, the user who sent it is becomes a member of the Squad. If an application is denied, the application is removed and user can submit a new application.
Only administrator users can add or remove moderators to/from a Squad.
"},{"location":"admin_guides/squads/#interface","title":"Interface","text":""},{"location":"admin_guides/squads/#squads-list","title":"Squads List","text":"Squads list is the entry point of squads. You can create a new squad, search for a squad, show available squads and get squad status from there. The Squads list is available to all users, without any restriction. You can access it using Squads
from the left sidebar.
The list is split in three main areas. First area, at top, contains controls which will allow you to create a squad, or filter the shown squads. The main area, contains squads tiles from the active page. You can get up to six squads per page. Footer area is the pagination controls - allowing you to switch displayed page (first, previous, current, next and last).
Every Squad Tile is built following the same pattern :
1) Logo 2) Name and description 3) User status related to that squad 4) Metadata 5) Type
Except metadata, other attributes are self-explained. Metadata is a list of counters showing you, from left to right:
Hint
Squad Logo is a visual way for your end user to identify quickly a Squad. By default, logo are generated based on the Squad Name - but you can customise it in the Squad settings.
"},{"location":"admin_guides/squads/#squads-card","title":"Squads Card","text":"When you click on a Squad Tile, you'll land on the related Squad Card. Squad Card is the landing area of a Squad. You will retrieve summarised information you had on the tile in the general pane.
In case the Squad is manual, you will get access to the list of Squad moderators. This list is public, this mean everyone can see it, without consideration if he's or not a member of that Squad.
Under the general pane, you'll get access to the list of roles assigned by the Squad. This list is disclosed to admin user only. This mean neither \"standard user\" or moderators will get access to it.
From that pane, you are able to remove a role from the squad or add other ones to it.
Members pane is visible to all moderators and squad members. Moderators can invite or kick user from the squad using actions buttons.
Info
When an user is kicked or invited from/to a Squad, the event is shown into security logs. You will be able to see who kick or invite any user from/to any Squad.
Last but not least, there is an extra Candidates pane which is available on Manual Moderated Squad. Squad applications can be managed from this area.
"},{"location":"admin_guides/squads/#squads-settings","title":"Squads Settings","text":"When you create a new Squad, you have to fill a small form which will define it. Mandatory elements are :
You also can upload a shiny logo which will be used instead the generated icon and provide filters for squad eligibility.
Caution
As soon as you save your Squad, filters are applied. In case the Squad is of auto type, eligible members will be added to it. For any other Squad Types, non-eligible members will be kicked from the Squad
Hint
Don't pay attention to your Squads Description. If it's too long, it will be shortened when displayed on the Squad Tile. However, the full description will always be available on the Squad Card into the general pane.
"},{"location":"admin_guides/understanding_tracking/","title":"Understanding Tracking","text":""},{"location":"admin_guides/understanding_tracking/#understanding-tracking","title":"Understanding Tracking","text":""},{"location":"admin_guides/understanding_tracking/#introduction","title":"Introduction","text":"SeAT implements the Google Analytics Measurement Protocol. This document aims to explain in as much detail as possible how it has been implemented in SeAT, as well as what is tracked and what is not. This document aims to be as transparent as possible.
"},{"location":"admin_guides/understanding_tracking/#why","title":"Why","text":"Well, the most obvious is it being nice to know how much SeAT is actually being used. One may argue that Github & packagist gives statistics on how many times the project has been installed / cloned, but that does not really reflect how many actual active installations there are.
Knowing how many active installs there are, encourages development.
Lastly, certain exception types are also sent as hits. This helps immensely with figuring out if a new version may have a serious bug.
"},{"location":"admin_guides/understanding_tracking/#how-its-implemented","title":"How its implemented","text":"First of all, the Google Analytics Measurement Protocol is really just that. It just measures usage. In summary, when certain events happen, only a hit with what happened is sent. No other data is sent with the hit.
For example. When the scheduler queues jobs, a hit is sent that says that this happened, and that it happened for x amount of keys. This can be seen in the following line of code: QueueKeys. It can also be seen that no other data goes along with the hit. For example, the access_token
and refresh_token
(which is what most will be worried about) does not go with the hit.
Once a hit is getting ready to be sent, information such as which OS/Version as well as versions of installed SeAT packages gets sent along with the hit. This can be seen in the following lines of code.
"},{"location":"admin_guides/understanding_tracking/#how-are-you-protecting-my-privacy","title":"How are you protecting my privacy?","text":"Very special care has been taken to ensure that no personally identifiable information goes along with the Measurement Protocol hits. In fact, its actually not allowed and serves no purpose for tracking. That being said, the following actions have been taken to ensure that privacy is key:
a
is specifically not sent as it will disclose the hostname of the server (Ref: eveseat/services:Jobs/Analytics#L151-L153)Sure!
Not at all. However, as a start I am going to limit access to people whom have actively contributed towards SeAT. If you would like access, please ping me on Slack.
"},{"location":"admin_guides/understanding_tracking/#how-do-i-disable-this-crap","title":"How do I disable this crap?","text":"If you insist on disabling the usage tracking, you can do this (as a SeAT administrator) by browsing to Configuration -> SeAT Settings and setting Allow Tracking to No.
"},{"location":"configuration/configuration_overload/","title":"Configuration Overload","text":"This page aims to give a brief overview of how configuration is handled in SeAT and its packages. To give some perspective, we have to have a quick look at how packages are built and bootstrapped.
"},{"location":"configuration/configuration_overload/#quick-n-dirty-package-summary","title":"Quick-n-dirty-package summary","text":"All of SeAT's core internals are built as packages. This means, every package has a service provider. All a service provider really is, is a class with 2 methods ie: handle()
and register()
. When a service provider is bootstrapped into the application, these 2 methods are called at some stage.
It is in these methods that we tell the Laravel framework more about our package. Amongst many things that we can tell it, one of them is configuration related. All we really telling the application is where the configuration file is, and under which namespace does it live. Another important fact is that SeAT package configurations are added with the mergeConfigFrom()
method. This means, you can override the defaults in your installation without worrying about breaking the package itself.
Lets take a look at a sample package configuration file: The eveseat/eveapi package for example. At the time of this writing, it has 5 configuration options. The first being a version
, the last being eseye_loglevel
. When this package is installed, this configuration file will live somewhere deep inside your vendor
folder. Changing the value there is not impossible, but it will be lost with the next package upgrade. The better method will be to override the change locally, inside you config/
folder here.
eseye_loglevel
","text":"To start, create the file eveapi.config.php
inside the config
folder. Next, we add the contents in the file to return an array, specifying the eseye_loglevel
key and its new value. The file would look something like this:
<?php\n// File: config/eveapi.config.php\nreturn [\n'eseye_loglevel' => 'debug',\n];\n
That's it. The configuration should now have been overridden.
"},{"location":"configuration/env_file_reference/","title":"Env File Reference","text":""},{"location":"configuration/env_file_reference/#env-reference","title":"Env Reference","text":"In both the case of a Docker installation as well as a host based installation (manual or via SeAT tool), SeAT has some configuration values that can be set via an .env
file. Depending on your installation type, this file will be in either /opt/seat-docker/.env
or in /var/www/seat/.env
EVE_CALLBACK_URL
without /auth/eve/callback
suffix DB_HOST 127.0.0.1 This is the IP or domain from your SQL Server. DB_PORT 3306 This is the port used by your SQL Server to receive query. DB_DATABASE seat This is the name for your SeAT database. DB_USERNAME seat This is the user which is granted to the SeAT database from SeAT server. DB_PASSWORD secret This is the user password MAIL_DRIVER smtp This is the driver used to send mail. It will be covered in a dedicated article. MAIL_HOST smtp.mailtrap.io This is driver mail hostname. It will be covered in a dedicated article. MAIL_PORT 2525 This is the driver mail port. It will be covered in a dedicated article. MAIL_USERNAME null This is the driver mail username. It will be covered in a dedicated article. MAIL_PASSWORD null This is the driver mail password. It will be covered in a dedicated article. MAIL_ENCRYPTION null This is the driver mail encryption. It will be covered in a dedicated article. MAIL_FROM_ADDRESS noreply@localhost.local This is the mail address which the user will chown when he will receive mail from SeAT. MAIL_FROM_NAME SeAT Administrator This is the name which the user will chown when he will receive mail from SeAT. EVE_CLIENT_ID null This is the EVE Application Client ID you'll get when you created an application over https://developers.eveonline.com EVE_CLIENT_SECRET null This is the EVE Application Client Secret you'll get when you created an application over https://developers.eveonline.com EVE_CALLBACK_URL https://seat.local/auth/eve/callback This is the EVE Application Callback URL you filled when you created an application over https://developers.eveonline.com. You should have only to fix seat.local
QUEUE_BALANCING_MODE false Determine the workers balancing mode used by the Jobs Manager. Value can be false
, auto
or simple
. See official Laravel documentation for more details QUEUE_WORKERS 4 Determine the amount of worker which have to be spawn to process jobs over all queues. In auto
and simple
balancing, this value cannot be lower than 4
as it's correspond to the available queues."},{"location":"configuration/esi_configuration/","title":"ESI Configuration","text":""},{"location":"configuration/esi_configuration/#configuring-eve-online-esi-scopes","title":"Configuring Eve Online ESI-Scopes","text":""},{"location":"configuration/esi_configuration/#introduction","title":"Introduction","text":"For normal operations within SeAT, authentication is provided by EVE Onlines' SSO service and API access with ESI and tokens supplied via SSO. Technical details behind the SSO implementation can be found here.
Authenticating users using SSO effectively means that users may authenticate to SeAT using their existing EVE Online credentials. SeAT does not have access to the credentials itself as that is handled entirely by CCP. Only once authentication is successful from an EVE Online perspective does a user get asked if they want to allow your SeAT installation to have access with the configured set of scopes. Once the user agrees to these scopes, the users browser is redirect back to SeAT and will be logged in.
If you have not configured this yet, the login page will present you with a warning about it:
"},{"location":"configuration/esi_configuration/#configuration-summary","title":"Configuration Summary","text":"A bit of setup work is needed in order to have your SeAT setup ready for SSO integration and ESI usage. The gist of it is:
EVE_CLIENT_ID
, EVE_CLIENT_SECRET
and EVE_CALLBACK_URL
in the .env
configuration fileBrowse to the EVE Online Developers portal and create a new Application.
Give your application a meaningful Name and a Description. Users will see this name when they review the access Third Party applications have to their account so keep that in mind when registering your application.
Next, set the connection type to Authentication & API Access (1), select the ESI Scopes you want (probably all of them) (2) and specify the Callback URL (3)
To select ESI Scopes you can search for them in Available Scopes (2) and select the desired scope. The selected scope then will moved to (3).
Note on the Callback URL
The Callback URL where the user should be redirected to once authentication was successful. In other words, once they have completed authentication using their EVE Online credentials, they need to be redirected back to your SeAT instance. In the example above, we can see it is https://seat.local/auth/eve/callback
. You should replace the seat.local
part with your domain!
For example, assuming you are hosting SeAT at https://this.is.seat/
, then the Callback URL will be https://this.is.seat/auth/eve/callback
. If you have SeAT in a sub folder on your web server, remember to add the folder name before /auth/eve/callback
.
With the new application created, you will now have the EVE_CLIENT_ID
, EVE_CLIENT_SECRET
that you need to configure in SeAT itself. Take note of these values.
.env
file","text":"We are almost done. The next thing to do is to add the configuration parameters to our SeAT installs .env
file. Browse to your SeAT installation directory and edit the .env
file (note this is a hidden file and wont show up when you just type ls
).
Look for the following section of the file and populate the values with those you got when you created an application on the developers site:
EVE_CLIENT_ID=null\nEVE_CLIENT_SECRET=null\nEVE_CALLBACK_URL=http://seat.test/auth/eve/callback\n
"},{"location":"configuration/esi_configuration/#notes-for-docker-users","title":"Notes for Docker Users","text":"Your .env
file is located in /opt/seat-docker
. Rebuild your app after setting the ESI Details in it using:
docker-compose down\ndocker-compose up -d\n
docker compose down\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker compose down\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
"},{"location":"configuration/eve_administrative_contact/","title":"EVE Administrative Contact","text":""},{"location":"configuration/eve_administrative_contact/#eve-api-administrative-contact","title":"Eve API Administrative Contact","text":""},{"location":"configuration/eve_administrative_contact/#what","title":"What","text":"Requests to the EVE API need to have an administrative contact email set before SeAT will queue jobs to process. CCP made the request in this Github issue. To address this, the email address is added to the User-Agent string that is used when making EVE API requests as can be seen eveseat/eveapi:Helpers/PhealSetup#L77.
"},{"location":"configuration/eve_administrative_contact/#why","title":"Why","text":"The error Failed to queue due to default config
is generated by eveseat/eveapi:Traits/JobManager#L47-L56 check. In order for this check to pass, you need to configure the administrative email address in the SeAT configuration.
Adding the email address can be done in two ways. Wither via the command line or via the Web interface.
"},{"location":"configuration/eve_administrative_contact/#web-interface","title":"Web interface","text":"The other method to change the admin email is via the web interface. You need to be logged in with a user that has the superuser
role. Typically, if the email address is not set, you may notice the following warning on the home page:
To configure it, browse to Configuration -> SeAT Settings from the side menu, and set the email in the Administrator Email field.
"},{"location":"configuration/eve_administrative_contact/#command-line","title":"Command line","text":"The command php artisan seat:admin:email
will prompt you to add a valid email address for the administrative contact:
Example:
"},{"location":"configuration/sde_overload/","title":"SDE Overload","text":"SeAT sources information about the SDE from a json file hosted here. It may happen that the SDE gets updated but the the json resource has not yet been updated. For this reason, its possible to specify the version to get based on what is available on www.fuzzwork.co.uk.
"},{"location":"configuration/sde_overload/#overriding-the-resources-json","title":"Overriding the resources json","text":"Check the version of SDE dumps available on www.fuzzwork.co.uk. At the time of this writing, frostline-1.0-116241
was the latest. Once you have the version string ready, open the .env
configuration file and add a key as follows:
SDE_VERSION=frostline-1.0-116241\n
When running the SDE updater, specify the --local
parameter to source the version string from the configuration file:
php artisan eve:update:sde --local\n
Info
By default, SeAT automatically updates the SDE every month. You may want to login as an administrator and remove the schedule to update it monthly if you have overridden the default.
"},{"location":"configuration/email_setup/gmail/","title":"GMail","text":""},{"location":"configuration/email_setup/gmail/#email-setup-using-gmail","title":"Email Setup - Using GMail","text":""},{"location":"configuration/email_setup/gmail/#introduction","title":"Introduction","text":"SeAT requires email to be setup to allow for things like notifications to be sent. This guide will attempt to describe how to go about setting up your email using GMail as an SMTP.
"},{"location":"configuration/email_setup/gmail/#the-config","title":"The config","text":"As with anything Laravel, the config for your email setup will live in your installs .env
file. To use GMail as an SMTP service, set the MAIL_DRIVER
option in your .env
configuration file to smtp
. Next, specify the SMTP details:
// File: .env\n\nMAIL_DRIVER=smtp\nMAIL_HOST=smtp.gmail.com\nMAIL_PORT=587\nMAIL_USERNAME=username@gmail.com\nMAIL_PASSWORD=gmailpassword\nMAIL_ENCRYPTION=tls\nMAIL_FROM_ADDRESS=username@gmail.com\n
Done! To test, you can add some mail notification using the Integrations
and Notification groups
.
SeAT requires email to be setup to allow for things like notifications to be sent. This guide will attempt to describe how to go about setting up your email using the Mailgun service. Though Mailgun is a commercial service, you get to send 10k emails for free per month. It also provides epic stats for you to track emails with etc.
"},{"location":"configuration/email_setup/mailgun/#the-config","title":"The config","text":"As with anything Laravel, the config for mailgun will live in your installs .env
file. To use the Mailgun driver, first set the MAIL_DRIVER
option in your .env
configuration file to mailgun
. Next, we will add two options to specify details about our mailgun account.
// File: .env\n\nMAILGUN_DOMAIN=whateveritis\nMAILGUN_SECRET=anotherthing\n
To find out the values you need to populate, login to your mailgun account and browse to the domains section. Pick the applicable domain name. The screen you will see should looks something similar to this:
The big title (sandbox1XXXXXXX
in my case) is the domain name, and the field titled API Key
is the MAILGUN_SECRET
.
Done! To test, you can add some mail notification using the Integrations
and Notification groups
.
This section aims to describe the functional differences between the various SeAT packages.
"},{"location":"developer_guides/core_package_breakdown/#eveseatapi","title":"eveseat/api","text":"Namespace: Seat\\Api
Source Code: link
This repository contains all the SeAT Api Endpoints, as well as the routes and views for API key management.
"},{"location":"developer_guides/core_package_breakdown/#eveseateveapi","title":"eveseat/eveapi","text":"Namespace: Seat\\Eveapi
Source Code: link
This repository is the heart of the API update logic. It is responsible for doing the actual update work, pulling the EVE API documents from ESI, parsing them and storing the resultant data in the database. Most of the data models live in this repository too.
"},{"location":"developer_guides/core_package_breakdown/#eveseatnotifications","title":"eveseat/notifications","text":"Namespace: Seat\\Notifications
Source Code: link
This repository contains a set of scheduled jobs that perform notifications type tasks. A notification can be something as simple as an alert about a corporation member that has been inactive for a period of time.
"},{"location":"developer_guides/core_package_breakdown/#eveseatweb","title":"eveseat/web","text":"Namespace: Seat\\Web
Source Code: link
This repository contains the web interface for SeAT. It contains by far the most complex service provider and will undoubtedly become the prime example/reference when developing packages for SeAT. This package is also the only one that has a permissions / ACL concept. Refer the to the permissions document for more information.
"},{"location":"developer_guides/core_package_breakdown/#eveseatseat","title":"eveseat/seat","text":"Namespace: App
Source Code: link
This is the main SeAT repository. It does not really contain much logic. In fact, it should just be seen as the glue between all the core packages. This is the repository that is cloned when a new installation is done.
The most important part of this repository is the service providers that are bootstrapped with the application. The providers array has the default Laravel providers as well as the SeAT providers at the end. These providers tell the application where to find routes, views, configs etc. For more detailed information about providers, refer to the Laravel 5.5 documentation. When you write your package though, you should make use of package discovery as described in the Laravel 5.5 documenation. This will make the installation of your package super simple without the need to edit any files.
"},{"location":"developer_guides/core_package_breakdown/#eveseatservices","title":"eveseat/services","text":"Namespace: Seat\\Services
Source Code: link
This repository contains 'services'. A service is defined as any form of helper and or repository that other packages can depend on. The eveseat/web package (amongst others) make heavy use of the repository classes in this package.
"},{"location":"developer_guides/developer_installation/","title":"Developer Installation","text":""},{"location":"developer_guides/developer_installation/#developer-installation","title":"Developer Installation","text":"Since SeAT 4 and including SeAT 5, starting with Docker build 4.1.0, spawning a development environment has been made easier. You can use the same image as of production environment - either you're working on core packages or third party ones.
"},{"location":"developer_guides/developer_installation/#general","title":"General","text":"First, start with standard installation to get a working environment.
The official docker-compose wrapper is shipped with a packages
directory. It is mounted readonly, and you can store your development sources in it.
To make things easier, we recommend you keep vendor path convention to split your sources across every single package you want to play with.
Developing plugins and core packages doesn't differ at all, modules installed in the packages
directory always take priority. In the case of core modules, this means the version from packages
and not the version provided by the docker container will be used.
The image has been designed to look for a file called override.json
inside packages
directory. When it is found, it will be merged together with standard composer.json
file from eveseat/seat
package.
It's designed to override both autoload
and providers
. Here is a complete override.json
structure:
{\n\"autoload\": {\n\"namespace_to_load\\\\\": \"packages/sources_path\"\n},\n\"providers\": [\n\"FQCN\\\\Provider\"\n]\n}\n
An override can have either autoload, providers or even both property. Do not forget to escape \\
in order to get a valid json file.
When your container will start, mapping from autoload
property in your override.json
file will be merged with autoload-dev
property from official composer.json
.
SeAT 4.x
docker exec seat-web sh
where seat-web
is the name of the target container.artisan
commands from outside of docker with docker exec seat-web php artisan <command>
SeAT 5.x
docker exec front sh
where front
is the name of the target container.artisan
commands from outside of docker with docker exec front php artisan <command>
Please note that there is currently no way to install dependencies with the package override.
"},{"location":"developer_guides/developer_installation/#teach-things-by-example","title":"Teach things by example","text":"As an example, let's say I want to make a new feature in web core package, I'll spawn an eveseat
directory at root packages
directory, followed by a clone from eveseat/web
git repository. Last but not least, I'll create an override.json
file to inform SeAT there are developer things to load.
packages
directory mkdir packages/eveseat
packages/eveseat/web
directory git clone https://github.com/eveseat/web.git packages/eveseat/web
override.json
to use custom web sourcescat > packages/override.json << EOL\n{\n \"autoload\": {\n \"Seat\\\\Web\\\\\": \"packages/eveseat/web/src/\"\n }\n}\nEOL\n
Tips
If you're working with Windows, prefer to store your files in wsl layer rather than Windows directory. Both work, however, you'll get better performances!
"},{"location":"developer_guides/development_tips/","title":"Development Tips","text":""},{"location":"developer_guides/development_tips/#development-tips","title":"Development Tips","text":"This page contains general tips and tricks that may be useful during package development.
"},{"location":"developer_guides/development_tips/#best-practices","title":"Best practices","text":"No doubt, there are no limits to what code you can write, how you structure it and how you name things. However, the last thing you want is to have conflicts with the SeAT core, or someone elses package! The following list contains some tips to help you avoid those conflicts and to help people better discover your packages:
seat
eg: seat-teamspeak
.seat
.Author\\Seat\\Package\\
eg: Warlof\\Seat\\Teamspeak\\
.warlof_teamspeak_users
. Although you shouldn't make your prefix too long, as there is a 64 character table length limit.warlof.teamspeak.address
.warlof.teamspeak.channels
.composer.json
file, set the type
to seat-plugin
.seatcore
like this: seatcore::my.route.to.someting
. You should follow a similar format: seat<plugin name>::<route>
Depending on what your package does, it may be interesting for you to know when data is created / deleted. Given that SeAT makes use of Laravel, you have the ability to subscribe to events that occur on any model within SeAT.
For example, should a User
model get deleted, the deleted
event will get fired. Writing an observer class and subscribing to it with \\Seat\\Web\\Models\\User::observer(\\My\\Namespace\\UserObserver::class)
will allow you to define a deleted()
method inside of your observer class and perform extra logic with the User
that got deleted.
Examples of where this may be interesting could be if you need to have cleanup code for tables that your package includes.
For more information, checkout the Laravel documentation on Eloquent Observers.
"},{"location":"developer_guides/job_queue_flow/","title":"Job Queue Flow","text":""},{"location":"developer_guides/job_queue_flow/#job-queue-flow","title":"Job Queue Flow","text":"When a job is queued, it's instance is serialized and push into the Redis database. Horizon, our jobs orchestrator is taking care of every new jobs falling in redis and push it to an available worker from the targeted queue.
With SeAT 4, queues have been renamed and are scoped. This helps to identify load per \"topic\" and ensure better parallel processing of jobs.
As shown bellow, queues characters
, corporations
and public
are dedicated to ESI jobs.
There is a dedicated queue to handle notifications tasks (like notifying a killmail on Discord). So, you will always get your notifications as fast as possible.
The last two other queues (high
and default
) have a general purpose.
high
queue is dedicated to jobs which have a critical level (like those related to security)default
queue is a bucket collecting all jobs without any other specified queueThe default (and recommended) jobs handling configuration is using auto balancing. This ensures every single queue always have a minimum of workers (1 is the default value).
Important
There are no ranking in queues, so, the high one is not most important than other in the way jobs are processing. Queue name doesn't influe on their ability to process load. So, please use high queue for really important/critical tasks only.
An editable draw.io xml to import can be found here: seat_jobs_flow.drawio
"},{"location":"developer_guides/notifications_implementation/","title":"Notifications Implementation","text":""},{"location":"developer_guides/notifications_implementation/#developers-guides-notifications-implementation","title":"Developers Guides - Notifications Implementation","text":"Seat 5
This guide is already updated for seat 5. Older versions of this guide can be found on github.
"},{"location":"developer_guides/notifications_implementation/#introduction","title":"Introduction","text":"SeAT is shipped with a built-in notification system which is able to send message across the world to almost any platform.
It is supporting e-mail, Slack and Discord out of the box.
However, thanks to Laravel, if you need to support another platform - you simply need to implement the related driver. See official Laravel Notification Channels website to get more about this.
Additionally, there is a system to mention certain users when a notification gets sent. Since we don't assume that many people need to implement this for a new platform, there is no written documentation. This is a good starting point to read the code: Config/notifications.mentions.php
"},{"location":"developer_guides/notifications_implementation/#configuration","title":"Configuration","text":"All notifications must be declared inside notifications.alerts.php
. You will want to create a file named like this in the Config
directory of your plugin and then use mergeConfigFrom
in your service provider to merge the seat core and plugin notification configuration. Every entry must follow this pattern:
'created_user' => [\n 'label' => 'notifications::alerts.created_user',\n 'handlers' => [\n 'mail' => \\Seat\\Notifications\\Notifications\\Seat\\Mail\\CreatedUser::class,\n 'slack' => \\Seat\\Notifications\\Notifications\\Seat\\Slack\\CreatedUser::class,\n ],\n]\n
created_user
must be unique overall system and will identify the very specific notification declaration. It will reference the notification definition composed of label
and handlers
keys.label
will reference a translation token - this is the value which will appear on user interface into notification settingshandlers
key is containers a list of available formatters. There is a formatter per available platform - or so called - channel.visible
key hides the notification from the list of available notifications, but you can still use the seat notification infrastructure normally. Realistically, you don't need this for anything.You can also look at the seat core notifications.alerts.php file as an example.
"},{"location":"developer_guides/notifications_implementation/#formatters","title":"Formatters","text":"Formatters are class which will define how message targeting a specific channel must be structured. In upper example, we have two formatters:
Formatter must extend a different abstract class depending on what kind of platform it supports:
Seat\\Notifications\\Notifications\\AbstractDiscordNotification
Seat\\Notifications\\Notifications\\AbstractSlackDiscordNotification
Seat\\Notifications\\Notifications\\AbstractMailNotification
Every formatter is composed of the following method:
populateMessage(Message $message, mixed $notifiable)
which will generate the structure message for the target platform. The type of Message
differs slightly according to which platform you're on, e.g. on discord it is a Seat\\Notifications\\Services\\Discord\\Messages\\DiscordMessage
, on slack it is a Illuminate\\Notifications\\Messages\\SlackMessage
.In SeAT, notifications are event based and sent by jobs queued in notifications
queue. This prevents to lock system while sending the information.
To send your notification, you will listen for system events (ie: a character notification created in the database) in order to dispatch the selected notification.
"},{"location":"developer_guides/notifications_implementation/#characters","title":"Characters","text":"All characters related notifications are handled by \\Seat\\Notifications\\Observers\\CharacterNotificationObserver
It is waiting for an Eve Online notification targeting a character to be registered and dispatch the related message to the requested platform - if asked for.
SeAT is shipped with numerous notifications - but due to the number of existing ones and the fact that there are regularly news notifications created by CCP attached to added features, it might append that a notification isn't handled.
You can track such cases using debug
log level which will generate a log entry looking like this:
Unsupported notification type.\\ type: TheNotificationTypeAsPerESIDefinition (see: https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications)\\ sender_type: character\\ notification: the YAML structure of the notification
You'll find all standard notifications handler related to character into the following namespace: \\Seat\\Notifications\\Notifications\\Characters
"},{"location":"developer_guides/notifications_implementation/#corporations","title":"Corporations","text":"Most of the corporations related notifications are handled by \\Seat\\Notifications\\Observers\\CharacterNotificationObserver
It is waiting for an Eve Online notification targeting a corporation to be registered and dispatch the related message to the requested platform - if asked for.
SeAT is shipped with numerous notifications - but due to the number of existing ones and the fact that there are regularly news notifications created by CCP attached to added features, it might append that a notification isn't handled.
You can track such cases using debug
log level which will generated a log entry looking like this :
Unsupported notification type.\\ type: TheNotificationTypeAsPerESIDefinition (see: https://esi.evetech.net/ui/#/Character/get_characters_character_id_notifications)\\ sender_type: corporation\\ notification: the YAML structure of the notification
Alternatively, notifications related to corporation member state are handled by \\Seat\\Notifications\\Observers\\CorporationMemberTrackingObserver
You'll find all standard notifications handler related to corporation into the following namespace: \\Seat\\Notifications\\Notifications\\Corporations
"},{"location":"developer_guides/notifications_implementation/#killmails","title":"Killmails","text":"All killmails related notifications are handled by \\Seat\\Notifications\\Observers\\KillmailNotificationObserver
It is waiting for a killmail being registered and dispatch the related message to the requested platform - if asked for.
"},{"location":"developer_guides/notifications_implementation/#squads","title":"Squads","text":"All squads related notifications are handled by \\Seat\\Notifications\\Observers\\SquadApplicationObserver and \\Seat\\Notifications\\Observers\\SquadMemberObserver
It is waiting for squads members and applications to be registered and dispatch the related message to the requested platform - if asked for.
You'll find all standard notifications handler related to Squads into the following namespace: \\Seat\\Notifications\\Notifications\\Seat
"},{"location":"developer_guides/notifications_implementation/#users","title":"Users","text":"All users related notifications are handled by \\Seat\\Notifications\\Observers\\UserObserver
It is waiting for a user to be registered and dispatch the related message to the requested platform - if asked for.
You'll find all standard notifications handler related to character into the following namespace: \\Seat\\Notifications\\Notifications\\Seat
"},{"location":"developer_guides/notifications_implementation/#porting-plugins-from-seat-4-to-5","title":"Porting Plugins from Seat 4 to 5","text":"All notifications continue to work without any changes, even though there have been major refactors. However, to profit of the new mentions system behind discord pings, you need to change a few things to update to the new notification structure:
Seat\\Notifications\\Notifications\\AbstractNotification
. Seat\\Notifications\\Notifications\\AbstractDiscordNotification
Seat\\Notifications\\Notifications\\AbstractSlackDiscordNotification
Seat\\Notifications\\Notifications\\AbstractMailNotification
toX()
method to a protected populateMessage(Messagetype $message, $notifiable)
. Instead of creating a new message, use the parameter $message
. The type Message
must be adjusted depending on your platform:Seat\\Notifications\\Services\\Discord\\Messages\\DiscordMessage
Illuminate\\Notifications\\Messages\\SlackMessage
Illuminate\\Notifications\\Messages\\MailMessage
Seat\\Notifications\\Traits\\NotificationDispatchTool
trait to dispatch notification. It helps to deduplicate the most common logic.The old plugin structure will stop working in seat 6.
"},{"location":"developer_guides/package_development/","title":"Package Development","text":""},{"location":"developer_guides/package_development/#developers-guides-package-development","title":"Developers Guides - Package Development","text":""},{"location":"developer_guides/package_development/#introduction","title":"Introduction","text":"So, you want to write a SeAT package? Hopefully this guide helps you along the way! This guide was written while writing the API package for SeAT here. I figured it would be best to try and capture the process to help in case I miss any important details.
Be sure to also have a look at the Development Tips page!
"},{"location":"developer_guides/package_development/#background-notes","title":"Background notes","text":"I think its important to keep in mind a few things about how SeAT is put together. The most important being a brief description of what each core package offers, and how you can integrate with them. For a breakdown on what the core packages provide, please refer the to [breakdown].
SeAT 4 is written on Laravel 6, while SeAT 5 uses Laravel 10. A very good thing to do would be to actually read the documentation top->bottom and get an idea of what is possible with the framework. SeAT core packages make heavy use of many of the features, based directly of what has been interpreted by this very documentation.
If you really want to start contributing packages, but just cant get your head around this whole Laravel thing, then I can suggest you have a look at this excellent free course material covering the basics of what you will encounter in the SeAT codebase. https://laracasts.com/series/laravel-6-from-scratch
Other plugins and the SeAT core are also a good learning resource.
"},{"location":"developer_guides/package_development/#getting-started","title":"Getting started","text":"The very first thing to do is prepare the empty git repository on say Github, as well as the composer package itself. Clone a clean repository, and run composer init
, answering any questions. Once that is done, edit the resultant composer.json
and prepare the autoload
block. SeAT core follows the PSR-4 autoloading standard. I will suggest you do the same. For some more detailed composer info, refer to the docs here. For the API package, I am going to autoload Seat\\Api from the src
directory using PSR-4.
As mentioned in the package breakdowns, the eveseat/seat repository bootstraps packages via service providers or package discovery. This is actually a Laravel convention that SeAT just follows. To get our package ready, we need to create a service provider. For the API package, I create an ApiServiceProvider
class in src/
directory which extends Seat\\Services\\AbstractSeatPlugin
. Our packages file structure now looks as follows:
\u251c\u2500\u2500 composer.json\n\u2514\u2500\u2500 src\n \u2514\u2500\u2500 ApiServiceProvider.php\n
Hint
The AbstractSeatPlugin
class is extending Laravel ServiceProvider
class and ship you with useful methods that help to register your plugin in the stack (including version discovery, permissions registration, etc...). You must use it rather than the standard one, especially if you want permissions and get your packages in Settings > SeAT Settings > SeAT Module Versions pane.
From here you pretty much free to do what you want. How you structure the package will obviously depend on what exactly your package provides. In principle, I prefer to follow the same package structure as Laravel does for web / console features. Since we are going to be providing web features with the API, we will quickly create a few folders in preparation for this. I know beforehand that we are going to need a model to store API tokens; middleware to authenticate API requests; routes and controllers for the actual api logic (preferably making use of the eveapi/services repository classes for data access) as well as a few web views for administrators to generate API tokens for applications. With that in mind, the initial structure looks as follows:
\u251c\u2500\u2500 composer.json\n\u2514\u2500\u2500 src\n \u251c\u2500\u2500 ApiServiceProvider.php\n \u251c\u2500\u2500 Config\n \u251c\u2500\u2500 Http\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 Controllers\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 Middleware\n \u251c\u2500\u2500 Models\n \u251c\u2500\u2500 database\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 migrations\n \u2514\u2500\u2500 resources\n \u2514\u2500\u2500 views\n
This will obviously change as we progress building the package.
"},{"location":"developer_guides/package_development/#routes-and-controllers","title":"Routes and controllers","text":"To start testing the API, we need to add a route and controller to process some requests and responses. My routes.php
file will have a global Route::group()
to encapsulate the routes in the Seat\\Api namespace as well as prefix them with api/
.
// File: routes.php\nRoute::group([ 'namespace' => 'Seat\\Api\\Http\\Controllers',\n 'prefix' => 'api'\n], function () {\n // Logic here\n});\n
See the final product here for a more complete example.
Next, I add some logic with a route to /
, update the base frameworks composer.json
to autoload the Seat\\Api namespace from the directory where my package lives, run composer dump-autoload
and add the service provider to the eveseat/seat repositories app.php
providers array. Lastly, I add a method to the service provider to load the routes and call it form the boot()
method in the generated stub.
See the complete service provider here
/**\n* Include the routes\n*/\npublic function add_routes()\n{\n if (!$this->app->routesAreCached()) {\n include __DIR__ . '/Http/routes.php';\n }\n}\n
As a final test, I check that my route is accessible from a booted SeAT app. :)
"},{"location":"developer_guides/package_development/#routes","title":"Routes","text":""},{"location":"developer_guides/package_development/#access-control","title":"Access Control","text":"Obviously, some routes are not for everyone's eyes. SeAT comes with middleware that can be used to filter out requests that may not be authorized for your route. As can be seen in the example below (from here), we are filtering out requests to api-admin
for only superusers.
Route::group([\n 'namespace' => 'Admin',\n 'middleware' => ['auth', 'can:global.superuser'], // The ACL specification.\n 'prefix' => 'api-admin'\n ], function () {\n Route::get('/', [\n 'as' => 'seatcore::api-admin.list',\n 'uses' => 'ApiAdminController@listTokens']);\n });\n
I suggest you have a look at the eveseat/web
packages routes definitions for more examples on how the middleware is used. https://github.com/eveseat/web/tree/master/src/Http/Routes
It is recommended that you scope the route name defined in 'as' => 'seatcore::api-admin.list'
. For example all routes from the seat core start with seatcore
like this: seatcore::my.route.to.someting
. You should follow a similar format: seat<plugin name>::<route>
To auth our API requests, we are going to go with token based authentication for now. We want users to present us with a X-Token
header (from a valid allowed src IP address) before they may proceed with their request. To do this, we will filter requests using middleware. Thankfully, again, Laravel comes with a command to stub us some empty middleware. Run php artisan make:middleware ApiToken
and copy it to your projects Middleware
folder. Next we should register the middleware in our service provider. I do this by adding a method and calling it in boot()
.
See the complete middleware here
/**\n * Include the middleware needed\n *\n * @param $router\n */\npublic function add_middleware($router)\n{\n // Authenticate checks that the token is valid\n // from an allowed IP address\n $router->middleware('api.auth', ApiToken::class);\n}\n
"},{"location":"developer_guides/package_development/#views","title":"Views","text":"Although almost all of our interfacing with this package will be via the json api endpoints, we need to add a few routes that will give an administrator the ability to generate API tokens as well as view logs etc. This will be for an administrator, so we will re-use the ACL features provided by the eveseat/web
package to ensure that only admins an access our api-admin routes. Views live in resources/views
and are bootstrapped to the api
namespace in the service provider. See the service provider here for an example.
Note how we are re-using views that exist in the web
namespace. All we have to do is extend one of the grids like here and start without our blade template.
Integrating with the sidebar is also really easy. All you have to do is create a config file, bootstrap it in the service provider and viola. The config file itself has a set structure for the web
package to interpret and can be seen here.
return [\n 'api' => [\n 'permission' => 'global.superuser',\n 'name' => 'Api Tokens',\n 'icon' => 'fas fa-exchange',\n 'route_segment' => 'api-admin',\n 'entries' => [\n [ // Manage API Tokens\n 'name' => 'Manage',\n 'icon' => 'fas fa-key',\n 'route' => 'api-admin.list'\n ]\n ]\n ]\n];\n
The format is generally an array, whereby the first key is the name of your package (api
in this case). Thereafter you can specify the main entry, and any sub entries you want to add. The route
key should refer to the named route. The sidebar loader will resolve the route itself for you. If you have any permissions requirements for your package, the permission
key can be used together with a required SeAT permission to render the view.
Integrating with the character sub menus is also really easy. Just like the sidebar, all you have to do is create a config file, bootstrap it in the service provider and viola. The namespace should be named package.character.menu
in your service provider. A sample config file can be seen below:
// file: package.character.menu.php\nreturn [\n [\n 'name' => 'Research',\n 'permission' => 'character.research',\n 'highlight_view' => 'research',\n 'route' => 'character.view.research'\n ]\n];\n
"},{"location":"developer_guides/package_development/#corporation-submenus","title":"Corporation submenus","text":"Integrating with the corporation sub menus is also really easy. Just like the sidebar and character menus, all you have to do is create a config file, bootstrap it in the service provider and viola. The namespace should be named package.corporation.menu
in your service provider. A sample config file can be seen below:
// file: package.corporation.menu.php\nreturn [\n [\n 'name' => 'Research',\n 'permission' => 'corporation.research',\n 'highlight_view' => 'research',\n 'route' => 'corporation.view.research'\n ]\n];\n
"},{"location":"developer_guides/package_development/#bootstrapping-menu-items","title":"Bootstrapping menu items","text":"In the above items, we refer to the files needing to be bootstrapped via the service provider. All this really means is that we have to tell the Laravel application where to find configuration information for a namespace. So, if we wanted to add a sidebar item, we would add the following line to the register()
method of the service provider:
// Include this packages menu items\n$this->mergeConfigFrom(__DIR__ . '/Config/package.sidebar.php', 'package.sidebar');\n
The first argument is the file with the sidebar definitions, the second is the namespace.
"},{"location":"developer_guides/package_development/#permissions","title":"Permissions","text":"You are able to register and use your own permissions for use within SeAT. This is relatively simple and done by creating a config file in the location Config/Permissions/package.permissions.php
. It should return an array of the following format:
[\n 'sheet' => [\n 'label' => 'Grant access to Character Sheet',\n 'description' => 'The Character Sheet contains basic information....',\n 'division' => 'financial',\n ],\n 'intel' => [\n 'label' => 'web::permissions.character_intel_label',\n 'description' => 'web::permissions.character_intel_description',\n 'division' => 'military',\n ],\n 'planetary' => [\n 'label' => 'web::permissions.character_planetary_label',\n 'description' => 'web::permissions.character_planetary_description',\n 'division' => 'industrial',\n ],\n];\n
property mandatory purpose label yes The displayed name of your permission. It must be a translation token. description The displayed permission description. It should help user to determine what the permission is doing. It must be a translation token. division It will show a \"category\" icon to help user figures what will be impacted by the permission. Value can be one of military
, assets
, financial
, industrial
. gate If you need to manage your permission with a custom policy, you can provide a policy FQCN. The definition key (sheet
, intel
, planetary
in the upper sample) will be used as permission unique identifier by the system. This is the one stored in the database, together with scope.
Info
By default, if no gate are provided, those shipped in core will be used according to this pattern :
You'll find policy sample at this location.
In SeAT 4, a permission is made of a scope and an ability. The ability is defined by the permissions configuration file and the scope is defined on registration.
This config file is then loaded from your app service provider as below:
$this->registerPermissions(__DIR__ . '/Config/Permissions/package.permissions.php', 'package');\n
"},{"location":"developer_guides/package_development/#database","title":"Database","text":"For our API package, we have a database requirement. We need to store api tokens and the ip address that is allowed to use them. We are also going to store an access log (based on the config setting). We create migrations and models just like you would for a base Laravel 6 application. The only thing to remember is that your migrations for your package must be published (and specified in your service provider).
Registering these migrations looks like the following:
$this->loadMigrationsFrom(__DIR__ . '/database/migrations/');\n
"},{"location":"developer_guides/package_development/#releasing-the-plugin","title":"Releasing the plugin","text":"The usual setup is to host the code on github and distribute the code via packagist. When you submit your plugin on packagist, it will be installable like the other plugins by adding <vendor>/<package>
to the appropriate section of your .env
file.
SeAT has a REST API. Endpoints are protected by an access token that is limited by IP address. For every IP address that wants to make API requests to SeAT, a unique token is required. API Tokens have no concept of ACL's. The API should primarily be used for integrations with other systems.
"},{"location":"developer_guides/seat_api/#definitions","title":"Definitions","text":"Currently, all API endpoints live at <seat url>/api/<version>
where <seat url>
is the full url to your SeAT instance and <version>
is the API version you wish to interact with.
Since SeAT 3.0, API documentation is generated from source code annotations and presented via a Swagger UI. As a result, endpoint documentation is now directly available on your instance at the following address <seat url>/api/documentation
. A link to the documentation is also provided on the API key management page available to users with the Superuser role.
Swagger JSON
If you get an error when viewing the API documentation that complains about a file called api-docs.json
, make sure that you ran the php artisan l5-swagger:generate
command as part of the installation and upgrade routines.
Authentication to the SeAT API is done via a X-Token
header. A token may be obtained by browsing to the API settings page in the SeAT WebUI and generating one. A sample request using curl
with an authentication token can be seen below:
$ curl -X GET -H \"X-Token:123456\" -H \"Accept: application/json\" http://localhost:8000/api/v1/key\n* Trying ::1...\n* Connected to localhost (::1) port 8000 (#0)\n> GET /api/v1/key HTTP/1.1\n> Host: localhost:8000\n> User-Agent: curl/7.43.0\n> Accept: application/json\n> X-Token:123456\n>\n< HTTP/1.1 200 OK\n< Host: localhost:8000\n< Connection: close\n< Cache-Control: no-cache\n< Date: Sat, 28 Nov 2015 22:27:12 GMT\n< Content-Type: application/json\n
"},{"location":"developer_guides/seat_api/#content-type","title":"Content-Type","text":"Make sure you specify the Accepted content-type header as application/json
. When using cURL
, you can specify it with -H
Example:
$ curl -X POST https://seat.testsite.local/api/v1/key -H \"Accept: application/json\" -H \"X-Token: L3SxgdX4XUw6pVWVSCftgsh16eAbBF3D\" -d \"key_id=123&v_code=123\"\n{\"v_code\":[\"The v code must be 64 characters.\"]}\n
If you don't do this, the API will respond with a redirect and not give you the expected content.
"},{"location":"developer_guides/seat_api/#errors","title":"Errors","text":"All SeAT API responses will include the appropriate HTTP response codes. You should check this for error handling purposes. Some sample response codes could be:
Code Status Description 200 OK The request was successful. 404 Not Found The requested endpoint could not be found. 422 Unprocessable Entity Typically, input validation has failed. The response json should contain the errors. 500 Internal Server Error Something bad has happened. Check the server and Laravel log files for more details."},{"location":"developer_guides/updating_plugins/","title":"Updating Plugins","text":""},{"location":"developer_guides/updating_plugins/#updating-plugins","title":"Updating Plugins","text":"This page aims to help with porting a SeAT plugin to a newer version of seat.
"},{"location":"developer_guides/updating_plugins/#from-seat-4","title":"From SeAT 4","text":"SeAT 5 mainly upgrades the php and laravel version as well as all dependencies to their newest version. However, there are a few other breaking changes that can't be ignored.
seatcore::
. For example, notifications.integrations.list
turns into seatcore::notifications.integrations.list
. If your plugin uses routes pointing to the seat core, you will have to update them.Seat\\Eveapi\\Jobs\\Middleware\\WithoutOverlapping
job middleware backport is now provided by laravel and got removed from the SeAT core. Use Illuminate\\Queue\\Middleware\\WithoutOverlapping
instead. Just swapping the import should be enough, as they are compatible.MyJob::dispatchNow()
got replaced with MyJob::dispatchSync()
If you're upgrading a SeAT 3.x plugin, the cheat sheet bellow will probably helps you.
SeAT 3.x SeAT 4.x Purposeauth()->user()
auth()->user()
Retrieve the currently authenticated user. auth()->user()->group->main_character
auth()->user()->main_character
Retrieve the main character from the currently authenticated user. auth()->user()->group->main_character->name
auth()->user()->name
Retrieve the main character name from the currently authenticated user. auth()->user()->group->characters
auth()->user()->characters
Retrieve all characters from the currently authenticated user. auth()->user()->refresh_token
CharacterInfo()->refresh_token
Retrieve the refresh token attached to a character. auth()->user()->group->refresh_tokens
auth()->user()->refresh_tokens
Retrieve all refresh tokens attached to authenticated user. Also, if you need it, a table called mig_groups
is available in database containing a list of all converted group into standalone user. This table will stay here until next SeAT major update.
group_id
The unique ID from SeAT 3 user group old_user_id
The unique ID from SeAT 3 user (match to Character ID) new_user_id
The unique ID from SeAT 4 user main_character_id
The SeAT 3 registered main character ID - or random from the User Group if none were set"},{"location":"installation/docker_installation/","title":"Docker Installation (5.x)","text":""},{"location":"installation/docker_installation/#docker","title":"Docker","text":"Docker is ideally the installation route you want to go. Docker enables us to run SeAT on any platform capable of running docker itself (which includes Windows!). Additionally, upgrades and service maintenance are really low effort as you don't have to care about any dependencies. All of it is maintained within a docker stack, DockerHub and the GitHub Container Registry.
Windows owner recommendation
If you plan on running Docker on Windows, for the best performance it is suggested that you run Docker using the Windows Subsystem for Linux 2 (WSL2) backend, available starting in Windows 10/Windows Server 20H1 (build 2004) releases.
Windows owner special installation path
If you are using Docker on Windows, you will need to use the Manual Deployment option below.
Tip
Before starting the installation process, be sure you read this complete document first. It will help you understand all the steps from an installation process.
If you feel like docker might not be your cup of tea, checkout some of the other getting started guides that are available.
Eve Application and ESI
SeAT uses CCP's ESI service in order to retrieve EVE Online-related information. Before you can make any authenticated calls to ESI, you have to register a third-party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
"},{"location":"installation/docker_installation/#internal-container-setup-overview","title":"Internal Container Setup Overview","text":"The setup for SeAT's docker installation orchestrated using docker-compose. With docker-compose, we can use YAML
files to define the entire stack complete with all the dependencies required to run SeAT. A pre-built and recommended compose file (which is also used by the bootstrapping script) is hosted in the seat-docker repository here.
The official SeAT repository for Docker is shipped with a total of 4 YAML
files, allowing you both flexibility and understandability of the overall stack. A high-level overview of its contents is:
docker-compose.yml
file in which are listed SeAT services (front
to serve web ui, worker
to process jobs, scheduler
to manage repetitive tasks and cache
to store jobs queue)docker-compose.mariadb.yml
file in which is listed a mariadb
service - this way, you can replace mariadb by another supported database enginedocker-compose.traefik.yml
file in which is listed a traefik
service - this way you can simply and safely server your SeAT frontend to the rest of the worlddocker-compose.proxy.yml
file in which is adapted front
SeAT container to be server behind a reverse proxy of your choicemariadb-data
and seat-storage
is defined. These are the most important volumes as they contain all SeAT data. You should configure a backup solution for them!.env
file.tcp/8080
. It can be connected to in order to access the SeAT web interface.tcp/80
and tcp/443
are exposed and tcp/8080
remain unbound.The table bellow is listed overall consumed Docker image, including SeAT custom one - together with their source repository.
Image Name Image Repositorymariadb:10.11
https://hub.docker.com/_/mariadb/ redis:5-alpine
https://hub.docker.com/_/redis/ traefik:2.10
https://hub.docker.com/_/traefik ghcr.io/eveseat/seat:5
https://github.com/eveseat/seat-docker/pkgs/container/seat"},{"location":"installation/docker_installation/#seat-docker-installation","title":"SeAT Docker Installation","text":"Depending on whether you already have docker
and docker compose
already installed, you may choose how to start the installation. If you already have the required tooling installed and running their latest versions, all you need to do is download the latest SeAT Docker template archive to get started.
If you do not have the required software installed yet, consider running the bootstrap script that will check for docker
and docker compose
, install it and start the SeAT stack up for you. The script can be run with:
bash <(curl -fsSL https://raw.githubusercontent.com/eveseat/seat-docker/master/bootstrap.sh)\n
Once the script is finished, you can skip to the monitoring the stack section of this guide.
If you don't want to run this script, follow along in the next section of this guide.
"},{"location":"installation/docker_installation/#manual-deployment","title":"Manual Deployment","text":""},{"location":"installation/docker_installation/#docker-download","title":"Docker Download","text":"If you do not have docker
, install it now.
Under Linux, you can achieve this action by using the following command as root
:
sh <(curl -fsSL get.docker.com)\n
Under Windows, you can achieve this action by downloading and installing Docker Desktop.
"},{"location":"installation/docker_installation/#docker-compose-download","title":"Docker-compose Download","text":"If you do not have docker compose
, install it now with the following command as root
(Docker Compose is included with Docker Desktop on Windows):
# Downloads and install docker compose from Docker repository\nsudo apt-get update\nsudo apt-get install docker-compose-plugin\n
"},{"location":"installation/docker_installation/#docker-compose-working-directory","title":"Docker compose working directory","text":"With docker
and docker compose
ready, create yourself a directory in /opt
with mkdir -p /opt/seat-docker
and cd
to it. Remember this directory as you will need to come back to it often.
On Windows, create the C:\\seat-docker
directory with mkdir C:\\seat-docker
and cd
to it.
Then, download the SeAT Docker template archive with:
LinuxWindowscurl -fsSL https://github.com/eveseat/seat-docker/archive/refs/heads/master.zip -o seat-docker.zip\n
Invoke-WebRequest -Uri https://github.com/eveseat/seat-docker/archive/refs/heads/master.zip -OutFile seat-docker.zip\n
Next, decompress the template archive:
LinuxWindowsunzip seat-docker.zip -d /opt/seat-docker -j\n
Expand-Archive -Path c:\\seat-docker\\seat-docker.zip -DestinationPath c:\\seat-docker\n
Next, we will generate a unique application key - this is used internally for encryption:
LinuxWindowssed -i -- 's/APP_KEY=insecure/APP_KEY='$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c32 ; echo '')'/g' .env\n
$appkey = (-join ((65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_})); (Get-Content .env -Raw) -replace \"APP_KEY=insecure\", \"APP_KEY=$appkey\" | Set-Content .env\n
"},{"location":"installation/docker_installation/#seat-docker-configuration","title":"SeAT docker configuration","text":"Open up the .env
file in a text editor and fill in a few of the configuration items needed.
PROXY_BACKEND_HTTP_PORT
adapt to any integer of your convenience between 1 and 65535 in case you plan to serve SeAT behind a reverse proxy.TRAEFIK_ACME_EMAIL
adapt with your own e-mail address in case you plan to serve SeAT behind Traefik.SEAT_DOMAIN
should be set to the domain your installation lives on and on which SeAT UI will be served. DB_PASSWORD
must be adapt with a strong password of your own - it will be used as SeAT credential for its database.Warning
The DB_PASSWORD
value have to and must be changed only once - before any start of the overall stack. As soon as the database container is created, SeAT user account is initialized with the DB_PASSWORD
value. Changing it after the initial startup will prevent the stack to boot.
Also, at the initial startup, the root password from the database container will be shown in logs. You should consider taking a note of it - otherwise you will no longer have a way to recovery of a critical outage (ie: misconfiguration, etc...)
Finally, in case you plan to serve SeAT using Traefik, create an ACME configuration file with:
mkdir acme\ntouch acme/acme.json\nchmod 600 acme/acme.json\n
Info
SeAT docker template is shipped with Traefik to hide your container behind a proxy and securing traffic up to it. In case you want to manage traffic proxying and certification on your own, you must use docker-compose.proxy.yml
file on startup.
Warning
The location of the docker-compose.yml
and .env
files are important. You need to cd
back to the directory where these are stored in order to be able to execute commands for this stack at a later stage.
Also, be sure you provide a valid e-mail address as it will be used to register your account against Let's Encrypt in case you plan to serve SeAT with Traefik. For those unfamiliar with this, it's CA that provides valid certificates for free.
"},{"location":"installation/docker_installation/#esi-configuration","title":"ESI Configuration","text":"As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions on how to do this, please refer to the ESI Setup Guide.
With the configuration files ready, start up the stack with:
Using TraefikUsing proxydocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up\n
"},{"location":"installation/docker_installation/#monitoring-the-stack","title":"Monitoring the Stack","text":"Knowing what is going on inside your containers is crucial to understanding how everything is running as well as useful when debugging any problems that may occur. While the containers are starting up or have been running for a while, you can always cd
to the directory where your docker-compose.yml
file lives and run the logs
command to see the output of all the containers in the stack. For example:
cd /opt/seat-docker\ndocker compose logs --tail 10 -f\n
These commands will cd
to the directory containing the stacks docker-compose.yml
file and run the logs
command, showing the last 10 log entries and then printing new ones as they arrive. If you leave away the --tail 10
part, you can view all logs since the container startup.
All the relevant configuration lives inside the .env
file, next to your docker-compose.yml
file. Modify their values by opening it in a text editor, making the appropriate changes, and saving it again. Once that is done, restart the container environment:
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n
Success
You made it! Use a browser and browse to the domain / subdomain of your server to access SeAT!
"},{"location":"installation/manual_installation/","title":"Manual Installation (5.x)","text":""},{"location":"installation/manual_installation/#manual-installation","title":"Manual Installation","text":"This guide attempts to explain how to manually install SeAT onto an Ubuntu Server. A small amount of Linux experience is preferred when it comes to this guide, although it is not entirely mandatory.
Info
This guide has been written targetting Ubuntu. However, you can use it to deploy SeAT on any linux distribution. Just be sure you adapt commands to targetted distribution (mostly those related to the package manager).
Hint
Before starting to do anything, be sure you read the complete workflow once. It will help you to understand all steps from the installation process.
Eve Application and ESI
SeAT consumes CCP's ESI service in order to retrieve EVE Online related information. Before you can make any authenticated calls to ESI, you have to register a third party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
"},{"location":"installation/manual_installation/#getting-started","title":"Getting started","text":"We are going to assume you have root access to a fresh Ubuntu Server. Typically access is gained via SSH. All of the below commands are to be entered in the SSH terminal session for the installation & configuration of SeAT. If the server you want to install SeAT on is being used for other things too (such as hosting MySQL databases and or websites), then please keep that in mind while following this guide.
Packages are installed using the aptitude
package manager as the root
user.
Before we get to installing SeAT, lets ensure that your operating system is up to date. We can do that with basics :
apt-get update
to refresh the repositories cache.apt-get full-upgrade
to update any installed packages.reboot
in order to ensure any updated software is the current running version.apt-get autoremove
(after the reboot) to cleanup any unneeded packages.SeAT relies heavily on a database to function. Everything it learns is stored here, along with things such as user accounts for your users. It comes without saying that database security is a very important aspect too. So, ensure that you choose very strong passwords for your installation where required.
SeAT officially supports just MariaDB. Using MySQL or PostreSQL might appear to work on the surface, however it is likely that you will run into issues due to differences between the databases later down the line, and almost no testing with them is done during development.
We need to ensure that we have the latest MariaDB installed. To help with this, MariaDB provides an official repository to get the latest versions.
To download and install the repo, you need curl
. Install it with:
apt-get install curl\n
Let's add this repository with:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash\n
With the repository now setup, lets install the database server:
Warning
During the installation, you may be asked to set a password for the root
MariaDB user account. Make sure you set a long, strong password and remember it. It will be needed for the next step.
apt-get install mariadb-server\n
Before we can configure the database, we have to start it:
systemctl enable mariadb.service\n
Next, we are going to secure the database server by removing anonymous access and setting a root
password (if you have not been prompted for it yet).
Note
The database root
password should not be confused with the operating systems root
passwords. They are both completely different. They should also not have the same password.
To secure the database, run:
mariadb-secure-installation\n
This will ask you a series of questions where you should generally just answer yes to. If you already set a root
password in the previous step then you dont have to set it again, otherwise, make sure you choose a long, strong password for the root
account. An example run is shown below:
[...]\nEnter current password for root (enter for none): IF ONE WAS SET, IGNORE THIS\nOK, successfully used password, moving on...\n\n[...]\nSet root password? [Y/n] y\nNew password: SET A STRONG PASSWORD HERE\nRe-enter new password: SET A STRONG PASSWORD HERE\nPassword updated successfully!\nReloading privilege tables..\n ... Success!\n\n[...]\nRemove anonymous users? [Y/n] y\n ... Success!\n\n[...]\nDisallow root login remotely? [Y/n] y\n ... Success!\n\n[...]\nRemove test database and access to it? [Y/n] y\n\n[...]\nReload privilege tables now? [Y/n] y\n ... Success!\n\n[...]\n
That concludes the installation of the database server and securing it.
Next, we need to create an actual user and database for SeAT to use on the newly installed server. To do this we use the mariadb
command line client and enter a few commands as the root
user to create the database and the user that will be accessing the server. Let get to it.
Fire up the mariadb
client as root by running:
mariadb -uroot -p\n
This will prompt you for a password. Use the password you configured for the root
account when we ran mysql_secure_installation
. This will most probably be the last time you need to use this password :)
If the password was correct, you should see a prompt similar to the one below:
root@ubuntu:~# mysql -uroot -p\nEnter password:\nWelcome to the MariaDB monitor. Commands end with ; or \\g.\nYour MariaDB connection id is 16\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB [(none)]>\n
Create a new database for SeAT to use with:
create database seat;\n
The output should be similar to the below:
MariaDB [(none)]> create database seat;\nQuery OK, 1 row affected (0.00 sec)\n
Next, we need to create the user that SeAT itself will use to connect and use the new seat
database:
GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd';\n
Of course, you need to replace s_p3rs3c3r3tp455w0rd
with your own unique and strong password. Successfully running this should present you with output similar to the below:
MariaDB [(none)]> GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd';\nQuery OK, 0 rows affected (0.00 sec)\n
In the example above, we have effectively declared that SeAT will be using the database as seat:s_p3rs3c3r3tp455w0rd@localhost/seat
.
Finally, we will flush the database server privileges:
FLUSH PRIVILEGES;\n
That concludes the database server setup. You can exit the prompt with exit
;
Note
Remember the password for the seat
database user as we will need it later to configure SeAT.
Since SeAT is written primarily in PHP, we will need to install PHP packages. Ubuntu based systems can make use of the ondrej PPA which is a very popular repository used for specific PHP versions.
Depending on the version of Ubuntu you are using, a release specific repository URL should be used for the PPA. Select the tab applicable to your Ubuntu version and run the commands within.
Jammy 22.04Focal 20.04Bionic 18.04echo \"deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main\" >> /etc/apt/sources.list.d/php.list\necho \"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu jammy main\" >> /etc/apt/sources.list.d/php.list\n
echo \"deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main\" >> /etc/apt/sources.list.d/php.list\necho \"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu focal main\" >> /etc/apt/sources.list.d/php.list\n
echo \"deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main\" >> /etc/apt/sources.list.d/php.list\necho \"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu bionic main\" >> /etc/apt/sources.list.d/php.list\n
Next, we will have to download the new repositories GPG signing key and add it into our keychain
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C\n
With the new repository configured, update the package lists with:
apt-get update\n
Finally, install the required PHP packages with:
apt-get install libpng-dev libfreetype6-dev libjpeg-dev\napt-get install openssl zip php8.2-bz2 php8.2-cli php8.2-curl php8.2-dom php8.2-gd php8.2-gmp php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-redis php8.2-zip\n
"},{"location":"installation/manual_installation/#redis","title":"Redis","text":"SeAT makes use of Redis as a cache and message broker for the Queue back end. Installing it is really easy. Do it with:
apt-get install redis-server\n
Hint
By default, redis is making backup from its database - so it ensure integrity in case of failure. However, in certain condition, like power outage, this backup might be unprocessable and avoid redis to run.
Since we don't store anything critical in it, you may want to disable this. To do so, edit the configuration file using nano /etc/redis/redis.conf
and search line appendonly no
, change it for appendonly yes
If you are on a small server, You may also want to limit the part of memory used by redis (by default, it will consume all available memory). To do so, into the redis configuration file, search line # maxmemory <bytes>
and change it for maxmemory xGB
where x
is the memory limit you want to set.
You might also need to start redis:
systemctl enable redis-server.service\n
"},{"location":"installation/manual_installation/#seat-installation","title":"SeAT Installation","text":""},{"location":"installation/manual_installation/#prerequisites","title":"Prerequisites","text":"Excellent progress! All of the operating system level requirements are now met and we are almost ready to install SeAT itself. The only thing that is outstanding is the package manager called composer
as well as the git
client. The combination of composer
and git
will let us download the SeAT source code from Github and install it locally.
Install git
with:
apt-get install git\n
"},{"location":"installation/manual_installation/#composer","title":"Composer","text":"Next, install composer
with:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && hash -r\n
Thats it. Lets install SeAT! By default, we suggest you run SeAT from within /var/www/seat
. As part of the installation, the seat
directory will be created for us, but we will need to create /var/www
for now as we have not yet configured the web server.
Create the www
directory with:
mkdir -p /var/www\n
Next, cd
to the new /var/www
directory with:
cd /var/www\n
"},{"location":"installation/manual_installation/#seat-download","title":"SeAT Download","text":"With all of the prerequisites installed as well as our www
directory ready we can finally download SeAT. Do that with:
composer create-project eveseat/seat:5.0 --no-dev --no-interaction\n
Once the download is done, you should have seen output such as:
Writing lock file\nGenerating optimized autoload files\n> Illuminate\\Foundation\\ComposerScripts::postAutoloadDump\n> @php artisan package:discover\nDiscovered Package: darkaonline/l5-swagger\nDiscovered Package: eveseat/api\nDiscovered Package: eveseat/console\nDiscovered Package: eveseat/eveapi\nDiscovered Package: eveseat/notifications\nDiscovered Package: eveseat/services\nDiscovered Package: eveseat/web\nPackage manifest generated successfully.\n> @php artisan key:generate\nApplication key [base64:CmhqYNkaIcHo8nYC8LiEWa3U5/+BiTLih5dZftxlV2k=] set successfully.\n
"},{"location":"installation/manual_installation/#permissions","title":"Permissions","text":"You may have noticed a warning about composer
running as root
. For now this can be safely ignored. Post the installation of the SeAT source code, we need to fix up the permissions of the downloaded files. Do that with:
chown -R www-data:www-data /var/www/seat\nchmod -R guo+w /var/www/seat/storage/\n
This will ensure that the web server, cron jobs and workers have access to the source code as well as logs.
"},{"location":"installation/manual_installation/#seat-setup","title":"SeAT Setup","text":"With SeAT downloaded, we need to configure it. There are a number of configuration tasks needed. These include editing the applications .env
file as well as running some commands that setup and seed the database. A configuration value reference can be found here.
The first task would be to configure the applications database connection. Open the file located at /var/www/seat/.env
with something like vi
or nano
and update the database options with your values. Typically, only the password would really need to be updated. If you are making use of an existing database somewhere else over the network, update the applicable fields such as DB_HOST
accordingly.
DB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=seat\nDB_USERNAME=seat\nDB_PASSWORD=s_p3rs3c3r3tp455w0rd # <-- this is the value you probably need to edit.\nDB_DEBUG=false\n
"},{"location":"installation/manual_installation/#database-migrations-and-seeds","title":"Database Migrations and Seeds","text":"Next we need to publish the database migrations and web assets (such as JavaScript scripts and CSS Style sheets), run those migrations and finally seed the SeAT job schedule.
Publish the assets and database migrations with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan vendor:publish --force --all'\n
Run the database migrations with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan migrate'\n
Seed the SeAT schedule with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\\\Services\\\\Database\\\\Seeders\\\\PluginDatabaseSeeder'\n
"},{"location":"installation/manual_installation/#eve-sde-update","title":"EVE Sde Update","text":"SeAT makes use of a number of tables from the EVE Static Data Exports. MariaDB conversions of this data is available at https://www.fuzzwork.co.uk/dump/ and used in SeAT.
To update to the latest SDE within SeAT, run:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan eve:update:sde'\n
"},{"location":"installation/manual_installation/#supervisor","title":"Supervisor","text":"The jobs ecosystem within SeAT requires a process supervisor to ensure that the job runner stays alive. The job runner itself is implemented using Laravel Horizon and is monitored using supervisord.
To configure the Horizon process monitor, first install supervisor
:
apt-get install supervisor\n
Next, we will create a dedicated configuration file which will ask supervisor to keep an eye on Horizon. This file will live in /etc/supervisor/conf.d/seat.conf
. Create this file with its recommended configuration with:
cat > /etc/supervisor/conf.d/seat.conf << EOL\n[program:seat]\ncommand=/usr/bin/php /var/www/seat/artisan horizon\nprocess_name = %(program_name)s-80%(process_num)02d\nstdout_logfile = /var/log/seat-80%(process_num)02d.log\nstdout_logfile_maxbytes=100MB\nstdout_logfile_backups=10\nnumprocs=1\ndirectory=/var/www/seat\nstopwaitsecs=600\nuser=www-data\nEOL\n
Finally, reload supervisor to apply the new configuration with the following command:
systemctl enable supervisor.service\n
"},{"location":"installation/manual_installation/#crontab","title":"Crontab","text":"A crontab entry is needed for SeAT. While simple in implementation, this crontab entry simply helps the application invoke a job checker very minute. The actual schedule is stored within SeAT itself and managed entirely via the Web Interface.
To configure the crontab entry required for SeAT, run the following commands:
echo '* * * * * php /var/www/seat/artisan schedule:run >> /dev/null 2>&1' > /tmp/seat-crontab.tmp\n
Next, add this crontab for the www-data
user with:
crontab -u www-data /tmp/seat-crontab.tmp\n
If you want to confirm that the crontab successfully installed, you can check it with crontab -u www-data -l
.
Almost there!
You almost made it to the end! Just one more step.
The SeAT web interface requires a web server to serve the HTML goodies it has. We highly recommend you to use nginx
and will be covered in this document. You don't have to use it, so if you prefer something else, feel free.
Together with an nginx
installation we also need to install php-fpm
to handle the PHP execution for us. Let's install nginx
and php-fpm
with:
apt-get install nginx php8.2-fpm\n
"},{"location":"installation/manual_installation/#nginx-configuration","title":"Nginx Configuration","text":"With the webserver installed, we need to configure nginx
to serve SeAT. For that, a configuration file needs to be created that will tell nginx
where to find php-fpm
as well as where the assets are for SeAT.
The configuration file will live at /etc/nginx/sites-available/seat
. It can be created with the following command:
cat > /etc/nginx/sites-available/seat << EOL\nserver {\n listen 80;\n listen [::]:80;\n # If you are hosting this instance on a domain, set that\n # name here.\n #server_name seat.yourdomain.com;\n # SeAT public directory. This is the only directory that\n # should be exposed by the webserver. If one has to expose\n # the parent directory then things like the .env file will\n # be available for anyone to download.\n root /var/www/seat/public;\n index index.php;\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n # PHP-FPM configuration.\n location ~ \\.php\\$ {\n try_files \\$uri /index.php =404;\n fastcgi_pass unix:/run/php/php8.2-fpm.sock;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n # Even though .htaccess rules mean nothing in the nginx\n # world, prevent those from being downloaded anyways.\n location ~ /\\.ht {\n deny all;\n }\n # In case someone messes up, prevent .env files from\n # being downloaded as well.\n location ~ /\\.env {\n deny all;\n }\n}\nEOL\n
Warning
The code block above should not be copied directly into a file. It is a script and should be pasted directly into the linux terminal. It will create the nginx config for you. If you create the file yourself with the above content then the file will not be valid and you will receive errors from nginx.
The configuration file as is at /etc/nginx/sites-available/seat
itself won't be loaded by nginx
yet. Storing configuration files in a *sites-available*
directory is simply a convention used to allow administrators to quickly add & remove sites if needed. To apply the changes made by the new configuration file it needs to be symlinked to a *sites-enabled*
directory.
Let's symlink to the new configuration and drop the default one as a hardening exercise at the same time:
ln -s /etc/nginx/sites-available/seat /etc/nginx/sites-enabled/seat\nrm /etc/nginx/sites-enabled/default\n
Finally, reload nginx
and php-fpm
for the new changes to take affect:
systemctl restart nginx.service\nsystemctl restart php8.2-fpm.service\n
"},{"location":"installation/manual_installation/#esi-configuration","title":"ESI Configuration","text":"As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions how to do this, please refer to the ESI Setup Guide.
Info
You may want to serve your SeAT installation over SSL (using HTTPS) - which is a recommanded behavior. There are many way to do it, you can have a look on Let's Encrypt which provide you valid certificates for free. Put an eye to their Certbot Documentation.
Success
You made it! Use a browser and browse to the IP address / hostname of your server to access SeAT!
"},{"location":"installation/requirements/","title":"Requirements","text":""},{"location":"installation/requirements/#requirements","title":"Requirements","text":""},{"location":"installation/requirements/#hardware-requirements","title":"Hardware Requirements","text":"As far as hardware goes, there isn't really a hard and fast rule on what is needed. The more resources you make available, the faster API updates will occur. However, there are some minimum recommended specifications.
Info
Required CPU cores are indicative and may changes depending on your processor. They have been based on a one tier deployment (app, workers and database are hosted on the same server).
To improve accuracy regarding CPU requirements, we provide a Coremark value. Since Cloud providers like Azure and Google Cloud are providing their instance benchmark using this test, it should give you a more meaningful idea of what we are talking about.
Warning
If you intend to process a large amount of data, plan your storage accordingly. The SeAT database can grow incredibly quickly depending on the amount of tokens you process.
Due to high I/O traffic generated by SeAT, we recommand NVMe storage usage for best performances.
"},{"location":"installation/requirements/#up-to-25-characters","title":"Up to 25 characters","text":"Type Requirement CPU 2 virtual cores (Coremark 20 000+) Memory 2GB of RAM with a swap file Core Storage Space 1GB (tend to be stable) ESI Cache Storage Space 2GB (tend to grow with characters) Database Storage Space 5GB (tend to grow with characters and history)"},{"location":"installation/requirements/#up-to-500-characters","title":"Up to 500 characters","text":"Type Requirement CPU 2 virtual cores (Coremark 20 000+) Memory 4GB of RAM Core Storage Space 1GB (tend to be stable) ESI Cache Storage Space 5GB (tend to grow with characters) Database Storage Space 10GB (tend to grow with characters and history)"},{"location":"installation/requirements/#up-to-1-000-characters","title":"Up to 1 000 characters","text":"Type Requirement CPU 4 virtual cores (Coremark 40 000+) Memory 8GB of RAM Core Storage Space 1GB (tend to be stable) ESI Cache Storage Space 10GB (tend to grow with characters) Database Storage Space 20GB (tend to grow with characters and history)"},{"location":"installation/requirements/#more-than-1-000-characters","title":"More than 1 000 characters","text":"If you plan to run SeAT for more than 1 000 characters, you will have to fine tune your installation and carefully monitoring it. At time this documentation is wrote, a standard character is queuing around 50 jobs per wave. Since all jobs are not doing the same thing, it's difficult to provide you accurate figures.
A single worker is consuming around 200 MB of memory. Most jobs are requiring less than 5% of CPU - however, a few of them need more than 20% of it. The more jobs you'll get, the more workers you'll need to process queue in less than 60 minutes.
Warning
With such installation, you shouldn't share SeAT server resources with other services. Also, you should consider deploying database on another server.
"},{"location":"installation/requirements/#software-requirements","title":"Software Requirements","text":""},{"location":"installation/requirements/#docker-environment","title":"Docker Environment","text":"For Docker based installations, all you need is docker
. If you already have it installed, check your current version with docker version
.
docker -v
Info
If you plan to deploy SeAT on a Windows host, you will need Docker for Windows
Warning
Do not install Docker directly from your distributions repositories. These are usually out of date. Instead, rather follow the steps provided on dockers official documentation
When considering a VPS provider, make sure you choose one that does not make use of OpenVZ or similar operating-system level virtualization technologies. These virtualization technologies limit you in terms of kernel access as they purely containerize an existing Linux installation.
For a successful docker installation, choose a provider that uses para-virtualized technologies such as KVM, VMWare or XEN allowing you full control to the instance (and therefor the kernel itself). Examples of such providers are Digital Ocean, Linode and Vultr.
"},{"location":"installation/requirements/#bare-metal-environment","title":"Bare metal Environment","text":"Info
We consider \"bare metal\", any environment on which SeAT has been deployed manually (instead using containers).
If you plan to deploy SeAT on a Windows host, you will have to use Docker
Software version requirements are based on a minimum requirement.
Type Requirement State Check Operating System Linux (any distribution is suitable, however, Ubuntu tends to get more up-to-date packages on official repositories). Usually, runningcat /etc/issue
should give you a good idea. Architecture 64-bit only uname -p
PHP PHP: ^8.3 including mysql, gd, bz2, intl, pcntl, gmp, openssl, zip, opcache and redis extensions php -v
and php -i
Database MariaDB: ^10.2.7 mysql -V
Caching Service Redis redis-server -v
Service Supervisor Supervisor : 3 supervisord -v
Web Server NGinX or Apache nginx -v
or httpd -v
Tip
In case you want to deploy SeAT with Apache as web server, plan to configure it with Fast CGI using php-fpm instead embedded php process. Doing it so will make you benefit of significant improved performances.
"},{"location":"installation/old_versions/docker_installation_seat_4/","title":"Docker Installation (4.x)","text":""},{"location":"installation/old_versions/docker_installation_seat_4/#docker","title":"Docker","text":"Docker is ideally the installation route you want to go. Docker enables us to run SeAT on any platform capable of running docker itself (which includes Windows!). Additionally, upgrades and service maintenance are really low effort as you don't have to care about any dependencies. All of it is maintained within a docker stack and dockerhub.
Info
If you plan on running Docker on Windows, for the best performance it is suggested that you run Docker using the Windows Subsystem for Linux 2 (WSL2) backend, available starting in Windows 10/Windows Server 20H1 (build 2004) releases.
Hint
Before starting the installation process, be sure you read this complete document first. It will help you understand all of the steps from an installation process.
If you feel like docker might not be your cup of tea, checkout some of the other getting started guides that are available.
Warning
If you are using Docker on Windows, you will need to use the Manual Deployment option below.
Eve Application and ESI
SeAT used CCP's ESI service in order to retrieve EVE Online-related information. Before you can make any authenticated calls to ESI, you have to register a third-party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
"},{"location":"installation/old_versions/docker_installation_seat_4/#internal-container-setup-overview","title":"Internal Container Setup Overview","text":"The setup for SeAT's docker installation orchestrated using docker-compose. With docker-compose, we can use a single docker-compose.yml
file to define the entire stack complete with all of the dependencies required to run SeAT. A pre-built and recommended compose file (which is also used by the bootstrapping script) is hosted in the seat-docker repository here.
The previously mentioned compose file is really simple. A high-level overview of its contents is:
seat-network
is defined. All containers are connected to this network and is used as the primary means for inter-container communications.mariadb-data
is defined. This is the most important volume as it contains all of the database data. This is the one volume that you should configure a backup solution for!mariadb:10
https://hub.docker.com/_/mariadb/ redis:5-alpine
https://hub.docker.com/_/redis/ traefik:2.2
https://hub.docker.com/_/traefik eveseat/seat
https://hub.docker.com/r/eveseat/seat .env
file (not to be confused with the SeAT specific .env
file.tcp/80
and tcp/443
. These can be connected to in order to access the SeAT web interface.Depending on whether you already have docker
and docker-compose
already installed, you may choose how to start the installation. If you already have the required tooling installed and running their latest versions, all you need to do is download the latest docker-compose.yml
and .env
files to get started.
If you do not have the required software installed yet, consider running the bootstrap script that will check for docker
and docker-compose
, install it and start the SeAT stack up for you. The script can be run with:
bash <(curl -fsSL https://git.io/get-seat)\n
Once the script is finished, you can skip to the monitoring the stack section of this guide.
If you don't want to run this script, follow along in the next section of this guide.
"},{"location":"installation/old_versions/docker_installation_seat_4/#manual-deployment","title":"Manual Deployment","text":""},{"location":"installation/old_versions/docker_installation_seat_4/#docker-download","title":"Docker Download","text":"If you do not have docker
, install it now with the following command as root
:
sh <(curl -fsSL get.docker.com)\n
If you are on Windows, download and install Docker Desktop.
"},{"location":"installation/old_versions/docker_installation_seat_4/#docker-compose-download","title":"Docker-compose Download","text":"If you do not have docker-compose
, install it now with the following command as root
(Docker Compose is included with Docker Desktop on Windows):
# Downloads docker-compose\ncurl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\n\n# Makes docker-compose executable\nchmod +x /usr/local/bin/docker-compose\n
"},{"location":"installation/old_versions/docker_installation_seat_4/#docker-compose-working-directory","title":"Docker compose working directory","text":"With docker
and docker-compose
ready, create yourself a directory in /opt
with mkdir -p /opt/seat-docker
and cd
to it. Remember this directory as you will need to come back to it often.
On Windows, create the C:\\seat-docker
directory with mkdir C:\\seat-docker
and cd
to it.
Then, download the docker-compose.yml
file with:
curl -fsSL https://raw.githubusercontent.com/eveseat/seat-docker/4.x/docker-compose.yml -o docker-compose.yml\n
Invoke-WebRequest -Uri https://raw.githubusercontent.com/eveseat/seat-docker/4.x/docker-compose.yml -OutFile docker-compose.yml\n
Next, download the docker .env
file with:
curl -fsSL https://raw.githubusercontent.com/eveseat/seat-docker/4.x/.env -o .env\n
Invoke-WebRequest -Uri https://raw.githubusercontent.com/eveseat/seat-docker/4.x/.env -OutFile .env\n
Next, we will generate a unique application key - this is used internally for encryption:
LinuxWindowssed -i -- 's/APP_KEY=insecure/APP_KEY='$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c32 ; echo '')'/g' .env\n
$appkey = (-join ((65..90) + (97..122) | Get-Random -Count 32 | % {[char]$_})); (Get-Content .env -Raw) -replace \"APP_KEY=insecure\", \"APP_KEY=$appkey\" | Set-Content .env\n
"},{"location":"installation/old_versions/docker_installation_seat_4/#seat-docker-configuration","title":"SeAT docker configuration","text":"Open up the .env
file in a text editor and fill in a few of the configuration items needed.
TRAEFIK_DOMAIN
should be set to the base domain your installation lives on. SEAT_SUBDOMAIN
sould be the subdomain for the SeAT web UI. eg: seat.domain.local
For TLS configuration, you need to set the TRAEFIK_ACME_EMAIL
value, and then in the docker-compose.yml
file uncomment the labels that relating to certResolver
. They typically look like this: traefik.http.routers.api.tls.certResolver=primary
. Finally, create an ACME configuration file with:
mkdir acme\ntouch acme/acme.json\nchmod 600 acme/acme.json\n
Info
SeAT docker template is shipped with Traefik to hide your container behind a proxy and securing traffic up to it. In case you want to manage traffic proxying and certification on your own, you can disable traefik container from the stack by adding #
[front of lines] from the docker-compose.yml
file.
Warning
The location of the docker-compose.yml
and .env
files are important. You need to cd
back to the directory where these are stored in order to be able to execute commands for this stack at a later stage.
Also, be sure you provide a valid e-mail address as it will be used to register your account against Let's Encrypt. For those unfamiliar with this, it's CA that provides valid certificates for free.
"},{"location":"installation/old_versions/docker_installation_seat_4/#esi-configuration","title":"ESI Configuration","text":"As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions on how to do this, please refer to the ESI Setup Guide.
With the configuration files ready, start up the stack with:
docker-compose up -d\n
"},{"location":"installation/old_versions/docker_installation_seat_4/#monitoring-the-stack","title":"Monitoring the Stack","text":"Knowing what is going on inside of your containers is crucial to understanding how everything is running as well as useful when debugging any problems that may occur. While the containers are starting up or have been running for a while, you can always cd
to the directory where your docker-compose.yml
file lives and run the logs
command to see the output of all of the containers in the stack. For example:
cd /opt/seat-docker\ndocker-compose logs --tail 10 -f\n
These commands will cd
to the directory containing the stacks docker-compose.yml
file and run the logs
command, showing the last 10 log entries and then printing new ones as they arrive.
All of the relevant configuration lives inside the .env
file, next to your docker-compose.yml
file. Modify their values by opening it in a text editor, making the appropriate changes, and saving it again. Once that is done, run docker-compose up -d
again to restart the container environment.
Success
You made it! Use a browser and browse to the domain / subdomain of your server to access SeAT!
"},{"location":"installation/old_versions/manual_installation_seat_4/","title":"Manual Installation (4.x)","text":""},{"location":"installation/old_versions/manual_installation_seat_4/#manual-installation","title":"Manual Installation","text":"This guide attempts to explain how to manually install SeAT onto an Ubuntu Server. A small amount of Linux experience is preferred when it comes to this guide, although it is not entirely mandatory.
Info
This guide has been written targetting Ubuntu. However, you can use it to deploy SeAT on any linux distribution. Just be sure you adapt commands to targetted distribution (mostly those related to the package manager).
Hint
Before starting to do anything, be sure you read the complete workflow once. It will help you to understand all steps from the installation process.
Eve Application and ESI
SeAT consumes CCP's ESI service in order to retrieve EVE Online related information. Before you can make any authenticated calls to ESI, you have to register a third party EVE application on the developers portal. This is an absolute must for SeAT to be of any use. The configuration of this step is covered in a later stage of the documentation.
"},{"location":"installation/old_versions/manual_installation_seat_4/#getting-started","title":"Getting started","text":"We are going to assume you have root access to a fresh Ubuntu Server. Typically access is gained via SSH. All of the below commands are to be entered in the SSH terminal session for the installation & configuration of SeAT. If the server you want to install SeAT on is being used for other things too (such as hosting MySQL databases and or websites), then please keep that in mind while following this guide.
Packages are installed using the aptitude
package manager as the root
user.
Before we get to installing SeAT, lets ensure that your operating system is up to date. We can do that with basics :
apt-get update
to refresh the repositories cache.apt-get full-upgrade
to update any installed packages.reboot
in order to ensure any updated software is the current running version.apt-get autoremove
(after the reboot) to cleanup any unneeded packages.SeAT relies heavily on a database to function. Everything it learns is stored here, along with things such as user accounts for your users. It comes without saying that database security is a very important aspect too. So, ensure that you choose very strong passwords for your installation where required.
This document describes using MariaDB, but you can use MySQL as well. Just double check the requirements.
We need to ensure that we have the latest MariaDB installed. To help with this, MariaDB provides an official repository to get the latest versions. Let's add this repository with:
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash\n
With the repository now setup, lets install the database server:
Warning
During the installation, you may be asked to set a password for the root
MariaDB user account. Make sure you set a long, strong password and remember it. It will be needed for the next step.
apt-get install mariadb-server\n
Next, we are going to secure the database server by removing anonymous access and setting a root
password (if you have not been prompted for it yet).
Note
The database root
password should not be confused with the operating systems root
passwords. They are both completely different. They should also not have the same password.
To secure the database, run:
mysql_secure_installation\n
This will ask you a series of questions where you should generally just answer yes to. If you already set a root
password in the previous step then you dont have to set it again, otherwise, make sure you choose a long, strong password for the root
account. An example run is shown below:
[...]\nEnter current password for root (enter for none): IF ONE WAS SET, IGNORE THIS\nOK, successfully used password, moving on...\n\n[...]\nSet root password? [Y/n] y\nNew password: SET A STRONG PASSWORD HERE\nRe-enter new password: SET A STRONG PASSWORD HERE\nPassword updated successfully!\nReloading privilege tables..\n ... Success!\n\n[...]\nRemove anonymous users? [Y/n] y\n ... Success!\n\n[...]\nDisallow root login remotely? [Y/n] y\n ... Success!\n\n[...]\nRemove test database and access to it? [Y/n] y\n\n[...]\nReload privilege tables now? [Y/n] y\n ... Success!\n\n[...]\n
That concludes the installation of the database server and securing it.
Next, we need to create an actual user and database for SeAT to use on the newly installed server. To do this we use the mysql
command line client and enter a few commands as the root
user to create the database and the user that will be accessing the server. Let get to it.
Fire up the mysql
client as root by running:
mysql -uroot -p\n
This will prompt you for a password. Use the password you configured for the root
account when we ran mysql_secure_installation
. This will most probably be the last time you need to use this password :)
If the password was correct, you should see a prompt similar to the one below:
root@ubuntu:~# mysql -uroot -p\nEnter password:\nWelcome to the MariaDB monitor. Commands end with ; or \\g.\nYour MariaDB connection id is 16\nCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nMariaDB [(none)]>\n
Create a new database for SeAT to use with:
create database seat;\n
The output should be similar to the below:
MariaDB [(none)]> create database seat;\nQuery OK, 1 row affected (0.00 sec)\n
Next, we need to create the user that SeAT itself will use to connect and use the new seat
database:
GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd';\n
Of course, you need to replace s_p3rs3c3r3tp455w0rd
with your own unique and strong password. Successfully running this should present you with output similar to the below:
MariaDB [(none)]> GRANT ALL ON seat.* to seat@localhost IDENTIFIED BY 's_p3rs3c3r3tp455w0rd';\nQuery OK, 0 rows affected (0.00 sec)\n
In the example above, we have effectively declared that SeAT will be using the database as seat:s_p3rs3c3r3tp455w0rd@localhost/seat
.
Finally, we will flush the database server privileges:
FLUSH PRIVILEGES;\n
That concludes the database server setup. You can exit the prompt with exit
;
Note
Remember the password for the seat
database user as we will need it later to configure SeAT.
Since SeAT is written primarily in PHP, we will need to install PHP packages. Ubuntu based systems can make use of the ondrej PPA which is a very popular repository used for specific PHP versions.
Depending on the version of Ubuntu you are using, a release specific repository URL should be used for the PPA. Select the tab applicable to your Ubuntu version and run the commands within.
Bionic 18.04Focal 20.04echo \"deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main\" >> /etc/apt/sources.list.d/php.list\necho \"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu bionic main\" >> /etc/apt/sources.list.d/php.list\n
echo \"deb http://ppa.launchpad.net/ondrej/php/ubuntu focal main\" >> /etc/apt/sources.list.d/php.list\necho \"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu focal main\" >> /etc/apt/sources.list.d/php.list\n
Next, we will have to download the new repositories GPG signing key and add it into our keychain
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C\n
With the new repository configured, update the package lists with:
apt-get update\n
Finally, install the required PHP packages with:
apt-get install libpng-dev libfreetype6-dev libjpeg-dev\napt-get install curl openssl zip php7.3-bz2 php7.3-cli php7.3-curl php7.3-dom php7.3-gd php7.3-gmp php7.3-intl php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-redis php7.3-zip\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#redis","title":"Redis","text":"SeAT makes use of Redis as a cache and message broker for the Queue back end. Installing it is really easy. Do it with:
apt-get install redis-server\n
Hint
By default, redis is making backup from its database - so it ensure integrity in case of failure. However, in certain condition, like power outage, this backup might be unprocessable and avoid redis to run.
Since we don't store anything critical in it, you may want to disable this. To do so, edit the configuration file using nano /etc/redis/redis.conf
and search line appendonly no
, change it for appendonly yes
If you are on a small server, You may also want to limit the part of memory used by redis (by default, it will consume all available memory). To do so, into the redis configuration file, search line # maxmemory <bytes>
and change it for maxmemory xGB
where x
is the memory limit you want to set.
Excellent progress! All of the operating system level requirements are now met and we are almost ready to install SeAT itself. The only thing that is outstanding is the package manager called composer
as well as the git
client. The combination of composer
and git
will let us download the SeAT source code from Github and install it locally.
Install git
with:
apt-get install git\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#composer","title":"Composer","text":"Next, install composer
with:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && hash -r\n
Thats it. Lets install SeAT! By default, we suggest you run SeAT from within /var/www/seat
. As part of the installation, the seat
directory will be created for us, but we will need to create /var/www
for now as we have not yet configured the web server.
Create the www
directory with:
mkdir -p /var/www\n
Next, cd
to the new /var/www
directory with:
cd /var/www\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#seat-download","title":"SeAT Download","text":"With all of the prerequisites installed as well as our www
directory ready we can finally download SeAT. Do that with:
composer create-project eveseat/seat --no-dev --no-interaction\n
Once the download is done, you should have seen output such as:
Writing lock file\nGenerating optimized autoload files\n> Illuminate\\Foundation\\ComposerScripts::postAutoloadDump\n> @php artisan package:discover\nDiscovered Package: darkaonline/l5-swagger\nDiscovered Package: eveseat/api\nDiscovered Package: eveseat/console\nDiscovered Package: eveseat/eveapi\nDiscovered Package: eveseat/notifications\nDiscovered Package: eveseat/services\nDiscovered Package: eveseat/web\nPackage manifest generated successfully.\n> @php artisan key:generate\nApplication key [base64:CmhqYNkaIcHo8nYC8LiEWa3U5/+BiTLih5dZftxlV2k=] set successfully.\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#permissions","title":"Permissions","text":"You may have noticed a warning about composer
running as root
. For now this can be safely ignored. Post the installation of the SeAT source code, we need to fix up the permissions of the downloaded files. Do that with:
chown -R www-data:www-data /var/www/seat\nchmod -R guo+w /var/www/seat/storage/\n
This will ensure that the web server, cron jobs and workers have access to the source code as well as logs.
"},{"location":"installation/old_versions/manual_installation_seat_4/#seat-setup","title":"SeAT Setup","text":"With SeAT downloaded, we need to configure it. There are a number of configuration tasks needed. These include editing the applications .env
file as well as running some commands that setup and seed the database. A configuration value reference can be found here.
The first task would be to configure the applications database connection. Open the file located at /var/www/seat/.env
with something like vi
or nano
and update the database options with your values. Typically, only the password would really need to be updated. If you are making use of an existing database somewhere else over the network, update the applicable fields such as DB_HOST
accordingly.
DB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=seat\nDB_USERNAME=seat\nDB_PASSWORD=s_p3rs3c3r3tp455w0rd # <-- this is the value you probably need to edit.\nDB_DEBUG=false\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#database-migrations-and-seeds","title":"Database Migrations and Seeds","text":"Next we need to publish the database migrations and web assets (such as JavaScript scripts and CSS Style sheets), run those migrations and finally seed the SeAT job schedule.
Publish the assets and database migrations with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan vendor:publish --force --all'\n
Run the database migrations with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan migrate'\n
Seed the SeAT schedule with:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\\\Console\\\\database\\\\seeds\\\\ScheduleSeeder'\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#eve-sde-update","title":"EVE Sde Update","text":"SeAT makes use of a number of tables from the EVE Static Data Exports. MySQL conversions of this data is available at https://www.fuzzwork.co.uk/dump/ and used in SeAT.
To update to the latest SDE within SeAT, run:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan eve:update:sde'\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#supervisor","title":"Supervisor","text":"The jobs ecosystem within SeAT requires a process supervisor to ensure that the job runner stays alive. The job runner itself is implemented using Laravel Horizon and is monitored using supervisord.
To configure the Horizon process monitor, first install supervisor
:
apt-get install supervisor\n
Next, we will create a dedicated configuration file which will ask supervisor to keep an eye on Horizon. This file will live in /etc/supervisor/conf.d/seat.conf
. Create this file with its recommended configuration with:
cat > /etc/supervisor/conf.d/seat.conf << EOL\n[program:seat]\ncommand=/usr/bin/php /var/www/seat/artisan horizon\nprocess_name = %(program_name)s-80%(process_num)02d\nstdout_logfile = /var/log/seat-80%(process_num)02d.log\nstdout_logfile_maxbytes=100MB\nstdout_logfile_backups=10\nnumprocs=1\ndirectory=/var/www/seat\nstopwaitsecs=600\nuser=www-data\nEOL\n
Finally, reload supervisor to apply the new configuration with the following command:
systemctl restart supervisor.service\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#crontab","title":"Crontab","text":"A crontab entry is needed for SeAT. While simple in implementation, this crontab entry simply helps the application invoke a job checker very minute. The actual schedule is stored within SeAT itself and managed entirely via the Web Interface.
To configure the crontab entry required for SeAT, run the following commands:
echo '* * * * * php /var/www/seat/artisan schedule:run >> /dev/null 2>&1' > /tmp/seat-crontab.tmp\n
Next, add this crontab for the www-data
user with:
crontab -u www-data /tmp/seat-crontab.tmp\n
If you want to confirm that the crontab successfully installed, you can check it with crontab -u www-data -l
.
Almost there!
You almost made it to the end! Just one more step.
The SeAT web interface requires a web server to serve the HTML goodies it has. We highly recommend you to use nginx
and will be covered in this document. You don't have to use it, so if you prefer something else, feel free.
Together with an nginx
installation we also need to install php-fpm
to handle the PHP execution for us. Let's install nginx
and php-fpm
with:
apt-get install nginx php7.3-fpm\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#nginx-configuration","title":"Nginx Configuration","text":"With the webserver installed, we need to configure nginx
to serve SeAT. For that, a configuration file needs to be created that will tell nginx
where to find php-fpm
as well as where the assets are for SeAT.
The configuration file will live at /etc/nginx/sites-available/seat
. It can be created with the following command:
cat > /etc/nginx/sites-available/seat << EOL\nserver {\n listen 80;\n listen [::]:80;\n # If you are hosting this instance on a domain, set that\n # name here.\n #server_name seat.yourdomain.com;\n # SeAT public directory. This is the only directory that\n # should be exposed by the webserver. If one has to expose\n # the parent directory then things like the .env file will\n # be available for anyone to download.\n root /var/www/seat/public;\n index index.php;\n location / {\n try_files \\$uri \\$uri/ /index.php?\\$query_string;\n }\n # PHP-FPM configuration.\n location ~ \\.php\\$ {\n try_files \\$uri /index.php =404;\n fastcgi_pass unix:/run/php/php7.3-fpm.sock;\n fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n include fastcgi_params;\n }\n # Even though .htaccess rules mean nothing in the nginx\n # world, prevent those from being downloaded anyways.\n location ~ /\\.ht {\n deny all;\n }\n # In case someone messes up, prevent .env files from\n # being downloaded as well.\n location ~ /\\.env {\n deny all;\n }\n}\nEOL\n
Warning
The code block above should not be copied directly into a file. It is a script and should be pasted directly into the linux terminal. It will create the nginx config for you. If you create the file yourself with the above content then the file will not be valid and you will receive errors from nginx.
The configuration file as is at /etc/nginx/sites-available/seat
itself won't be loaded by nginx
yet. Storing configuration files in a *sites-available*
directory is simply a convention used to allow administrators to quickly add & remove sites if needed. To apply the changes made by the new configuration file it needs to be symlinked to a *sites-enabled*
directory.
Let's symlink to the new configuration and drop the default one as a hardening exercise at the same time:
ln -s /etc/nginx/sites-available/seat /etc/nginx/sites-enabled/seat\nrm /etc/nginx/sites-enabled/default\n
Finally, reload nginx
and php-fpm
for the new changes to take affect:
systemctl restart nginx.service\nsystemctl restart php7.3-fpm.service\n
"},{"location":"installation/old_versions/manual_installation_seat_4/#esi-configuration","title":"ESI Configuration","text":"As mentioned at the start of the guide, it is necessary for you to configure ESI. For instructions how to do this, please refer to the ESI Setup Guide.
Info
You may want to serve your SeAT installation over SSL (using HTTPS) - which is a recommanded behavior. There are many way to do it, you can have a look on Let's Encrypt which provide you valid certificates for free. Put an eye to their Certbot Documentation.
Success
You made it! Use a browser and browse to the IP address / hostname of your server to access SeAT!
"},{"location":"upgrading/from_seat_1_0/","title":"From SeAT 1.0","text":""},{"location":"upgrading/from_seat_1_0/#seat-10-to-20","title":"SeAT 1.0 to 2.0","text":"The upgrade path from SeAT 1.x to SeAT 2.0 requires some manual work. This is mainly due to the number of fundamental changes that were made in the SeAT 2.x release.
"},{"location":"upgrading/from_seat_1_0/#notes-on-the-upgrade","title":"Notes on the upgrade","text":"The way SeAT is structured has not changed much since its version 1x days. The biggest change is a Laravel framework upgrade to version 5.3. This introduced a new base layout for the application which is why the manual upgrade is needed.
The upgrade process has a large amount of database migrations that need to run so grab a coffee depending on how big your database is!
"},{"location":"upgrading/from_seat_1_0/#requirements","title":"Requirements","text":"/var/www/seat
.If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely). Its therefore recommended that you start by putting SeAT into maintenance mode before starting the upgrade. Do this by running the following command in your SeAT path.
$ cd /var/www/seat\n$ php artisan down\n
You should see the message Application is now in maintenance mode..
"},{"location":"upgrading/from_seat_1_0/#backups","title":"Backups","text":".env
file. This file contains all of your SeAT configuration. These values are needed to reconnect to the database once SeAT 2.0 is installed.Install PHP7 if you don't have it already. You can check your PHP version by running php -v
:
$ php -v\nPHP 7.0.14 (cli) (built: Dec 7 2016 10:25:25) ( NTS )\nCopyright (c) 1997-2016 The PHP Group\nZend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies\n
"},{"location":"upgrading/from_seat_1_0/#get-the-new-code","title":"Get the new code","text":"SeAT 2.0 can be installed in exactly the same place as where you had your v1.x installation. If you reuse this path then no webserver re-configuration will be needed. We will move the old installation out of the way, and install SeAT 2.0. To do this, run the following commands:
$ cd /var/www\n$ mv seat seat.old\n
You can double check that this was successful by running ls
and ensuring that there is a folder named seat.old
now.
composer create-project eveseat/seat seat --no-dev
:$ cd /var/www\n$ composer create-project eveseat/seat seat --no-dev\nInstalling eveseat/seat (2.0.0)\n- Installing eveseat/seat (2.0.0)\nLoading from cache\n\nCreated project in seat\n> php -r \"file_exists('.env') || copy('.env.example', '.env');\"\nLoading composer repositories with package information\nUpdating dependencies\n\n[ ... snip ... ]\n
"},{"location":"upgrading/from_seat_1_0/#publish-the-assets","title":"Publish the assets","text":"Next, we need to publish the new SeAT 2.0 CSS & Javascript and database migrations. This can be done with php artisan vendor:publish --force
.
.env
file","text":"With the new code ready to use, the next thing that is required is to reconnect the database. Remember that .env
file you backed up earlier? Refer to it for the values needed in the newly installed env file that can be found at /var/www/seat/.env
.
Important keys to populate with the correct values are:
DB_HOST=\nDB_PORT=\nDB_DATABASE=\nDB_USERNAME=\nDB_PASSWORD=\n
SeAT 2.0 introduced new configuration items in the .env
that you can review. There is also the option to configure Supervisor & SeAT integration, which can be done by following the admin guide titled SeAT & Supervisor Integration.
With the database reconnected, its time to run the migrations for SeAT 2.0. This is the part that may take some time, depending on how big your database is.
To run the migrations, make sure you are still in your seat path (/var/www/seat
) and run php artisan migrate
:
$ cd /var/www/seat\n$ php artisan migrate\n
You will see a bunch of messages and eventually your shell prompt again, indicating that it has completed. If you receive errors here, double check that you have entered the correct database settings in the .env
file previously mentioned.
With the database migration complete, its time to seed it with some of the static data SeAT needs. Do this with the following commands:
php artisan db:seed --class=Seat\\\\Notifications\\\\database\\\\seeds\\\\ScheduleSeeder\nphp artisan db:seed --class=Seat\\\\Services\\\\database\\\\seeds\\\\NotificationTypesSeeder\nphp artisan db:seed --class=Seat\\\\Services\\\\database\\\\seeds\\\\ScheduleSeeder\n
"},{"location":"upgrading/from_seat_1_0/#update-worker-jobs","title":"Update worker jobs","text":"The Laravel 5.3 upgrade in SeAT changed the way worker jobs are started. You can edit the command used to start a worker in your seat.conf
file in supervisor. Normally, this file will be somewhere like in /etc/supervisor/conf.d/
.
The only line you really need to edit is the one that starts with command
, replacing it with:
command=/usr/bin/php /var/www/seat/artisan queue:work --queue=high,medium,low,default --tries 1 --timeout=86100\n
A full block for SeAT 2.0 should therefore be:
[program:seat]\ncommand=/usr/bin/php /var/www/seat/artisan queue:work --queue=high,medium,low,default --tries 1 --timeout=86100\nprocess_name = %(program_name)s-80%(process_num)02d\nstdout_logfile = /var/log/seat-80%(process_num)02d.log\nstdout_logfile_maxbytes=100MB\nstdout_logfile_backups=10\nnumprocs=4\ndirectory=/var/www/seat\nstopwaitsecs=600\nuser=www-data\n
Note
Keep in mind the user
value and the path to artisan
should be correct. Update them to the correct values of you made changes to the defaults. The user
value differs many times based on Linux distribution too!
With all of that done, bring your application back up with php artisan up
and start the supervisor workers again. Watch the logs for any errors in case things have not gone as expected. If you need any help, feel free to join the Slack channel details in the Contact page on the left.
The upgrade path from SeAT 2.x to SeAT 3.0 requires some manual work. This is mainly due to the number of fundamental database changes that were made in SeAT 3.x.
"},{"location":"upgrading/from_seat_2_0/#notes-on-the-upgrade","title":"Notes on the upgrade","text":"Most of the database has been revamped to match ESI models. Therefore, we can't offer you a simple update as we do for minor patches. However, once migrated, updates can be done as per usual.
The process described bellow handles data conversion between the SeAT 2.x structure and SeAT 3.x one.
"},{"location":"upgrading/from_seat_2_0/#requirements","title":"Requirements","text":"/var/www/seat
.If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely). Its therefore recommended that you start by putting SeAT into maintenance mode before starting the upgrade. Do this by running the following command in your SeAT path.
php artisan down\n
If you are running this migration after CCP killed the XML API then there is probably no risk of the updaters doing anything useful anyways :D
"},{"location":"upgrading/from_seat_2_0/#backups","title":"Backups","text":".env
file. This file contains all of your SeAT configuration. These values may be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat2
. You don't have to update any config since we will only use the command line for the process. mv /var/www/seat /var/www/seat2
Follow standard installation instructions for SeAT 3.0.
Warning
You need to keep the current SeAT 2.0 installed in order to migrate data to a newly installed 3.0 instance. It doesn't have to be reachable from internet though since we will only use the command line for the process.
"},{"location":"upgrading/from_seat_2_0/#installing-the-migrator-package-on-seat-20","title":"Installing the migrator package on SeAT 2.0","text":"/var/www/seat2
- unless you changed it)seat-migrator
using composer require warlof/seat-migrator
app.php
file inside the config
folder by appending Warlof\\Seat\\Migrator\\MigratorServiceProvider::class,
to the end of providers
array.php artisan vendor:publish --force
php artisan migrate
php artisan seat:migrator:upgrade
and follow the wizardAt the end of the process, you will have most of your data transferred into the specified SeAT 3.0 database. Next, you can remove the seat2 directory with rm -R /var/www/seat2
and the old database.
Enjoy SeAT 3.0
Note
In case of any troubles, the migrator package did a backup before starting the migration process. The output is specified in the prompt while it is being done, but you will also find it in /var/www/seat2/storage/backup
.
As with anything, it is a very good idea to have backups ready before attempting any upgrades. In the case of SeAT, the most important component needs to be backed up is the SeAT database. Should something go wrong, then you can simply re-install SeAT, restore the database, and you should be good to go.
"},{"location":"upgrading/general/#docker-installation","title":"Docker installation","text":"As expected, updates for SeAT are deployed via images on the GitHub Container Registry. Every package version release will automatically start the build process to generate a new docker image. This means updates are super simple in the docker world. To update your instance, simply run:
SeAT 4.xSeAT 5.x - TraefikSeAT 5.x - Proxy# Update to the latest dockerhub images\ndocker-compose pull\n\n# Take the stack down\ndocker-compose down\n\n# Bring the stack back up\ndocker-compose up -d\n\n# Cleanup any dangling images\ndocker image prune -f\n
# Update to the latest dockerhub images\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml pull\n\n# Take the stack down\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml down\n\n# Bring the stack back up\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d\n\n# Cleanup any dangling images\ndocker image prune -f\n
# Update to the latest dockerhub images\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml pull\n\n# Take the stack down\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml down\n\n# Bring the stack back up\ndocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d\n\n# Cleanup any dangling images\ndocker image prune -f\n
Better safe then sorry
Always perform a database backup of your database before doing an update. Always.
"},{"location":"upgrading/general/#blade-installation","title":"Blade installation","text":"/var/www/seat
.supervisorctl stop all\n
php artisan down\n
composer
itself. This is not a hard requirement, but definitely recommended. Do this with:composer self-update\n
--no-dev
argument as these packages are generally not needed in production. Upgrade the packages with:composer update --no-dev\n
php artisan vendor:publish --force --all\n
php artisan migrate\n
php artisan db:seed --class=Seat\\\\Console\\\\database\\\\seeds\\\\ScheduleSeeder\n
php artisan up\n
php artisan cache:clear\n
php artisan config:cache\nphp artisan route:cache\n
supervisorctl start all\n
Better safe then sorry
Always perform a database backup of your database before doing an update. Always.
You can use mysqldump -uroot -p seat > backup.sql
(change root and seat according to your configuration)
The upgrade path from SeAT 3.0 to SeAT 4.0 requires some manual work. This is primarily due to large amounts of refactoring that made it into SeAT 4.
Info
Major changes have been made to the way packages workg together, especially the eveapi, web and services packages.
The way jobs are queued and queues themselves have also changed, mostly to reduce resource usage and to improve fluency.
Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 4. If you are unsure, join us on Slack so that we can tru and assist or redirect you to proper person.
Warning
Before you do anything, read and understand this entire upgrade guide.
Those instructions are valid for bare metal deployment only (non-docker installation). Please refer to docker instructions for a Docker installation.
Remember to do a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely) - or cause crash during database conversion. Please start to turning SeAT in maintenance mode, cutting jobs and clearing caches before starting the upgrade.
Turn workers down, use the command
service supervisor stop\n
Put SeAT in maintenance mode
sudo -H -u www-data bash -c 'php /var/www/seat/artisan down'\n
Clear cache
sudo -H -u www-data bash -c 'php /var/www/seat/artisan seat:cache:clear'\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#backups","title":"Backups","text":".env
file. This file contains all your SeAT configuration, including tokens watermark required to update your registered users content. These values might be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat3
. You don't have to update any config since we will only use the command line for the process.
mv /var/www/seat /var/www/seat3\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#php","title":"PHP","text":"If it's not already the case, you'll have to deploy at least PHP 7.3 on the server. The provided command bellow will help you in this task and add newly required PHP extensions in the meantime.
apt-get update\napt-get install libpng-dev libfreetype6-dev libjpeg-dev\napt-get install curl openssl zip php7.3-bz2 php7.3-cli php7.3-curl php7.3-dom php7.3-gd php7.3-gmp php7.3-intl php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-redis php7.3-zip\n
Remember to update your NGinX configuration to use the new CGI version. To do so, open configuration file located at /etc/nginx/sites-available/seat
and replace
fastcgi_pass unix:/run/php/php7.1-fpm.sock;\n
with
fastcgi_pass unix:/run/php/php7.3-fpm.sock;\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#seat","title":"SeAT","text":"Once packages have been updated, we will deploy the new SeAT's version using composer.
composer create-project eveseat/seat /var/www/seat \"4.0.*\" --no-dev --no-interaction\n
Once the download is done, you should have seen output such as:
Writing lock file\nGenerating optimized autoload files\n> Illuminate\\Foundation\\ComposerScripts::postAutoloadDump\n> @php artisan package:discover\nDiscovered Package: darkaonline/l5-swagger\nDiscovered Package: eveseat/api\nDiscovered Package: eveseat/console\nDiscovered Package: eveseat/eveapi\nDiscovered Package: eveseat/notifications\nDiscovered Package: eveseat/services\nDiscovered Package: eveseat/web\nPackage manifest generated successfully.\n> @php artisan key:generate\nApplication key [base64:CmhqYNkaIcHo8nYC8LiEWa3U5/+BiTLih5dZftxlV2k=] set successfully.\n
Finally, fix directories permissions using the two commands bellow:
chown -R www-data:www-data /var/www/seat\nchmod -R guo+w /var/www/seat/storage/\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#setup","title":"Setup","text":"Now sources have been deployed, we have to update .env
configuration file. Use information from backup located at /var/www/seat3/.env
to update the newly generated file located at /var/www/seat/.env
.
Info
In case you had third party packages installed, it's time to deploy them back. We invite you to report to their own documentation regarding any specific guideline.
Warning
Please pay special attention to APP_KEY, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD, EVE_CLIENT_ID, EVE_CLIENT_SECRET and EVE_CALLBACK_URL parameters.
"},{"location":"upgrading/from_seat_3_0/bare_metal/#database","title":"Database","text":"We will convert database to work with new SeAT version. To do so, we're using common commands disclosed bellow:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan vendor:publish --force --all'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan migrate'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\\\Console\\\\database\\\\seeds\\\\ScheduleSeeder'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan eve:update:sde --force'\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#complete","title":"Complete","text":"Finally, restore workers states and put SeAT online using initial commands in reverse order.
Put SeAT online
sudo -H -u www-data bash -c 'php /var/www/seat/artisan up'\n
Convert user tokens format from previous version
sudo -H -u www-data bash -c 'php /var/www/seat/artisan seat:token:upgrade'\n
Turn workers up
service supervisor start\n
"},{"location":"upgrading/from_seat_3_0/bare_metal/#access","title":"Access","text":"SeAT 4.0 is coming with a complete revamp of permissions system. As a result, your previous roles haven't been converted. However, they've been keep - so you can configure them with the new system.
You will have to use built-in admin account for your first connexion.
Info
Super administrator is now an user flag and have to be defined at user level instead of Access Permissions. You'll get more information regarding the new system on Admin Login and Authorizations pages.
"},{"location":"upgrading/from_seat_3_0/docker/","title":"SeAT 3.0 to 4.0 (Docker)","text":"The upgrade path from SeAT 3.0 to SeAT 4.0 requires some manual work. This is primarily due to large amounts of refactoring that made it into SeAT 4.
Info
Major changes have been made to the way packages workg together, especially the eveapi, web and services packages.
The way jobs are queued and queues themselves have also changed, mostly to reduce resource usage and to improve fluency.
Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 4. If you are unsure, join us on Slack so that we can tru and assist or redirect you to proper person.
Warning
Before you do anything, read and understand this entire upgrade guide.
Those instructions are valid for Docker deployment only. Please refer to bare metal instructions for a non-docker installation.
Remember to do make a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If you are currently using a docker installation for SeAT 3, you are in for a treat because upgrading is super easy. All we are going to do is bring the v4 stack up, connect your database and watch as the Docker entrypoint takes care of the rest.
This guide is going to step through some quick preparation steps, then perform the upgrade and finally, check that everything worked out as expected. Let's dive in.
"},{"location":"upgrading/from_seat_3_0/docker/#tldr-upgrades","title":"tl;dr upgrades","text":"We highly reccomend that you read the details of this upgrade guide to get familiar with what has changed. But, if this is your nth upgrade, maybe you just want to get the summary of everything, so here it is:
cd
to your install dir (which is probably /opt/seat-docker
) and bring the stack down with docker-compose down
.env
and docker-compose.yml
files.docker-compose.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/docker-compose.yml -o docker-compose.yml
..env
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/.env -o .env
.docker-compose
installation. It should be version 1.26
and up..env
file. Important configs include the TRAEFIK_
variables, the SEAT_SUBDOMAIN
variable. Copy over existing values from your old .env
file for the EVE_CLIENT_
variables, the APP_KEY
varaible and finally the DB_
variables.docker-compose up -d
and watch the migration process.docker-compose exec seat-web php artisan eve:update:sde --force -n
\ud83c\udf89
"},{"location":"upgrading/from_seat_3_0/docker/#docker-changes-since-seat-3","title":"Docker changes since SeAT 3","text":"A number of changes have been made how the docker-compose stack is glued together.
First, the docker repository for SeAT 4 has a new home here, and a new image here.
In SeAT 3, services such as web, workers and cron were all using seperate images. For SeAT 4, we have consilidated all of that into a single image, with a service-aware entrypoint. The code for all of this lives in a new dedicated repository instead of being \"hidden\" away in the script repo here. All of these changes also mean that we now have the ability to properly tag the docker images instead of relying on the latest
tag like we did in SeAT 3. Finally.
Next, the default nginx
web server has been replaced with Traefik. For the majority of users this means little to no change to what you were used to. However, if you were fronting your instance with another reverse proxy, it is important to be aware of this change. The base image used for the SeAT docker image uses apache2 to serve the web UI, and Traefik reverse proxies to this, exposing it to the world. Advanced users can rip this out, expose the apache server directly and continue using the setup you have. The options are limitless.
Before you upgrade, you need to backup.
"},{"location":"upgrading/from_seat_3_0/docker/#backup-your-database","title":"Backup your database","text":"The single most important thing you need is a backup of your SeAT 3 database. Without a backup you will not be able to recover in case of a disaster. So, head on over to the docker db backup section and do that right now.
"},{"location":"upgrading/from_seat_3_0/docker/#backup-your-env-file","title":"Backup your env file","text":"The .env
file is the one that has your SeAT installations' configuration. It contains things like your SSO Client ID and Secret (aka: credentials). By default, SeAT docker installations live in /opt/seat-docker
meaning your .env
file will be at /opt/seat-docker/.env
. Make a copy of this file and store it somewhere safe.
The docker-compose
binary should be upgraded so that we can make use of ${VARIABLES}
inside .env
files.
If you installed docker-compose
using your OS' package manager, upgrade the tool using that. Otherwise, a curl
invocation to download the latest version should also work.
curl -L https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\n
"},{"location":"upgrading/from_seat_3_0/docker/#stop-seat-3","title":"Stop SeAT 3","text":"First, we need to stop the SeAT 3 stack. Assuming you have the default /opt/seat-docker
location for your installation, cd to it first and then run:
docker-compose down\n
The output should be similar to this:
root@seat:/opt/seat-docker# docker-compose down\nStopping seat-nginx ... done\nStopping seat-cron ... done\nStopping seat-worker ... done\nStopping seat-app ... done\nStopping seat-mariadb ... done\nStopping seat-redis ... done\nRemoving seat-nginx ... done\nRemoving seat-cron ... done\nRemoving seat-worker ... done\nRemoving seat-app ... done\nRemoving seat-mariadb ... done\nRemoving seat-redis ... done\nRemoving network seat-docker_seat-network\n
"},{"location":"upgrading/from_seat_3_0/docker/#upgrading-to-seat-4","title":"Upgrading to SeAT 4","text":""},{"location":"upgrading/from_seat_3_0/docker/#get-the-new-docker-compose-file","title":"Get the new docker-compose file","text":"Warning
If you have made customisations to how you deployed SeAT with docker-compose, then you should probably not be replacing the compose file like we are about to do. Instead, have a look at the new one here and adapt.
Next, we will download the new SeAT 4 docker-compose file. Do that with:
mv docker-compose.yml docker-compose.yml.back\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/docker-compose.yml -o docker-compose.yml\n
With this we have created a copy of the older docker-compose file (just in case), and downloaded the new one.
"},{"location":"upgrading/from_seat_3_0/docker/#get-the-new-env-file","title":"Get the new .env file","text":"The next step is to get a fresh copy of the new .env
file to use together with the new docker-compose setup. There have been a number of changes to this file (primarily as a result of the web server swap out) which we will describe in the next section.
Get it with:
mv .env .env.back\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/.env -o .env\n
"},{"location":"upgrading/from_seat_3_0/docker/#configure-the-new-env-file","title":"Configure the new .env file","text":"Info
This is admitedly the hardest part of the migtation, so pay close attention. Take it slowly and think about what you are doing here.
There are four main settings categories that need to be updated in the new .env
file. Those are:
All of these categories will be described below in detail. For all of them, you have to open the newly downloaded .env
file in a text editor and update the values. To be sure you are editing the correct file, check its header. It should say:
# SeAT Docker Compose Configuration\n\n# Web server configuration.\n# SeAT running in a docker-compose setup ships with Traefik\n# as the default web server. You only need to configure the\n# parent domain and port where the web server will listen.\n# In most cases, just configuring the domain will be all\n# you need to do.\n
"},{"location":"upgrading/from_seat_3_0/docker/#traefik","title":"Traefik","text":"As mentioned earlier. The web server has been swapped out in favour of Traefik. As a result, you need to set a few configuration options to get the web UI to work. If you have a setup where you have configured something like nginx
outside of your Docker installation, we highly reccomend you just remove that and switch over to Traefik. Of anything, it's handling of TLS with Let's Encrypt is quite literally a one-time setup and forget thing.
Inside the .env
file, Traefik specific configuration options are prefixed with TRAEFIK_
. They are:
TRAEFIK_DOMAIN=seat.local\nTRAEFIK_HTTPS_PORT=443\nTRAEFIK_HTTP_PORT=80\nTRAEFIK_ACME_EMAIL=you@domain.com\n
These fields need to be updated as follows:
TRAEFIK_DOMAIN
: This is the base domain where your SeAT installation lives. For example, if your SeAT 3 installation lives at seat.domain.com, you enter domain.com here.TRAEFIK_HTTPS_PORT
: This is the external port that will be open to the world. SeAT 4 in docker with Traefik will only listen on TLS as well. Since its configured to be 443
, it will most likely clash with your external web server. We reccomend that you just disable your external web server and use Traefik. TLS configuration with it is a breeze!TRAEFIK_HTTPS_PORT
: This is the non-TLS port that Let's Encrypt (as part of the ACME protocol) will connect to during certificate renewals. SeAT will not be available here.TRAEFIK_ACME_EMAIL
: The email address used for Let's Encrypt certificate renewals.A SEAT_SUBDOMAIN
value is also present, which sets the subdomain where the SeAT web UI lives. This value needs to match what your SeAT 3 installation used, especially so that the existing SSO application you have configured on the EVE SSO portal matches the configured callback url.
By default, most folks will only configure the domain, subdomain and email and be done. Of course, if you have custom configurations and needs, feel free to adapt.
"},{"location":"upgrading/from_seat_3_0/docker/#traefik-tls","title":"Traefik - TLS","text":"Traefik should handle all of the relevant configuration to get your site to listen with a valid TLS certificate. The secrets for the TLS configuration in Traefik relies on an acme.json
file which you should mount into the Traefik container from the outside so that it persists restart.
Prepare the json file from within /opt/seat-docker
with:
mkdir acme\ntouch acme/acme.json\nchmod 600 acme/acme.json\n
Next, make sure you have the TRAEFIK_ACME_EMAIL
variable set, and finally, uncomment the labels that will make use of the Let's Encrypt cert resolver in the docker-compose.yml
file. By default, they will look like this, whereby you need to remove the #
in front.
(Note: the line below in docker-compose.yml
is located in two places, only remove the #
from seat-web)
#- \"traefik.http.routers.seat-web.tls.certResolver=primary\"\n
"},{"location":"upgrading/from_seat_3_0/docker/#eve-online-sso","title":"EVE Online SSO","text":"Since SeAT's authentication relies on EVE's SSO, you need to configure the relevant client id and secret. You can find your old values in the backup you have made of the .env
file. The values you need to set are:
EVE_CLIENT_ID
EVE_CLIENT_SECRET
For the callback URL, ensure that you have correctly configured the SEAT_SUBDOMAIN
value in the previous step.
By default, the APP_KEY
value for a fresh .env
file will be insecure
. This is a purposefully incorrectly formatted value. You can simply set this to the value you have for the same variable in your backup .env
file.
This is one of the more important steps. The database configuration needs to match what your SeAT 3 installation used because the database data lives in a docker volume. When the stack will start up for the first time again, the SeAT 4 container will have access to the SeAT 3 database volume, and run migrations there. So, you need to copy the database credentials from the old .env
file to the new one.
The variable names have remained unchanged, but for referece they are:
DB_DATABASE=seat\nDB_USERNAME=seat\nDB_HOST=mariadb\nDB_PASSWORD=i_should_be_changed\n
"},{"location":"upgrading/from_seat_3_0/docker/#bringing-seat-4-up","title":"Bringing SeAT 4 up","text":"The only thing that is left to do is to start the stack up again. The first time we are goin to start SeAT 4 we wont use the -d
flag. This is just so that you can see what's happening during the upgrade procedure. So, start SeAT with:
docker-compose up\n
You should see something like this happen when you run the above command:
root@seat:/opt/seat-docker# docker-compose up\nCreating network \"seat-docker_seat-network\" with the default driver\nPulling mariadb (mariadb:10)...\n10: Pulling from library/mariadb\n3ff22d22a855: Already exists\ne7cb79d19722: Already exists\n323d0d660b6a: Already exists\n\n...\n
After a while, migrations should start running:
...\n\nseat-web_1 | starting web service\nseat-web_1 | Starting first run routines\nseat-web_1 | Migrating: 2018_06_05_110000_drop_assets_from_outposts\nseat-web_1 | Migrated: 2018_06_05_110000_drop_assets_from_outposts (0.02 seconds)\nseat-web_1 | Migrating: 2019_02_09_110731_drop_type_from_notification_groups\nseat-web_1 | Migrated: 2019_02_09_110731_drop_type_from_notification_groups (0.01 seconds)\nseat-web_1 | Migrating: 2019_05_11_164831_add_permission_role_filter\n\n...\n
Warning
Do not interrupt the database migration phase. It will leave your database in a potentially corrupt state, meaning you are going to have to do some extra pluming to get a backup restored. Not a train smash, but not worth it.
Be patient, there are many, many database changes that need to apply.
Eventually, when everything is done you should start seeing the following output:
seat-worker_1 | [2020-08-19 21:11:45][2] Processing: Seat\\Eveapi\\Jobs\\Status\\Status\nseat-worker_1 | [2020-08-19 21:11:45][1] Processing: Seat\\Eveapi\\Jobs\\Status\\Esi\nseat-worker_1 | [2020-08-19 21:11:46][2] Processed: Seat\\Eveapi\\Jobs\\Status\\Status\nseat-worker_1 | [2020-08-19 21:11:46][1] Processed: Seat\\Eveapi\\Jobs\\Status\\Esi\n
This is a good sign, and means everything is now ready!
"},{"location":"upgrading/from_seat_3_0/docker/#check-your-installation","title":"Check your installation","text":"The first obvious step will be to check that you can access the web UI. If not, something is probably weird with the web server configuration and needs some tweaking.
If everything seems to be working fine, you can hit crtl + c
which will bring the stack down gracefully.
^CGracefully stopping... (press Ctrl+C again to force)\nStopping seat-docker_seat-cron_1 ...\nStopping seat-docker_seat-worker_1 ...\nStopping seat-docker_seat-web_1 ...\nStopping seat-docker_traefik_1 ... done\nStopping seat-docker_redis_1 ...\n
Then, bring it back up with the -d
flag.
docker-compose up -d\n
"},{"location":"upgrading/from_seat_3_0/docker/#convert-user-tokens","title":"Convert User Tokens","text":"SeAT 4.x is using the new CCP Token format (v2). In order to use registered tokens from your previous installation, you'll have to run the following command:
docker-compose exec seat-web php artisan seat:token:upgrade\n
"},{"location":"upgrading/from_seat_3_0/docker/#update-eve-sde","title":"Update EVE SDE","text":"This is the final step, for real. You need to update the EVE SDE. With your stack up and running (after executing docker-compose up -d
), you can now force an SDE update with:
docker-compose exec seat-web php artisan eve:update:sde --force -n\n
Congrats, and welcome to SeAT 4!
Info
Super administrator is now an user flag and have to be defined at user level instead of Access Permissions. You'll get more information regarding the new system on Admin Login and Authorizations pages.
"},{"location":"upgrading/from_seat_4_0/bare_metal/","title":"SeAT 4.x to 5.0 (Bare metal)","text":"The upgrade path from SeAT 4.0 to SeAT 5.0 requires a tiny amount of manual work.
Warning
Before you do anything, read and understand this entire upgrade guide.
Those instructions are valid for bare metal deployment only (non-docker installation). Please refer to docker instructions for a Docker installation.
Remember to do a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
Info
Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 5. If you are unsure, join us on Discord so that we can assist or redirect you to the proper person.
"},{"location":"upgrading/from_seat_4_0/bare_metal/#requirements","title":"Requirements","text":"If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely) - or cause crash during database conversion. Please start to turning SeAT in maintenance mode, cutting jobs and clearing caches before starting the upgrade.
Turn workers down, use the command
systemctl stop supervisor.service\n
Put SeAT in maintenance mode
sudo -H -u www-data bash -c 'php /var/www/seat/artisan down'\n
Clear cache
sudo -H -u www-data bash -c 'php /var/www/seat/artisan seat:cache:clear'\n
"},{"location":"upgrading/from_seat_4_0/bare_metal/#backups","title":"Backups","text":".env
file. This file contains all your SeAT configuration, including the keys to the ESI tokens required to update your registered users content. These values might be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat4
. You don't have to update any config since we will only use the command line for the process.
mv /var/www/seat /var/www/seat4\n
"},{"location":"upgrading/from_seat_4_0/bare_metal/#php","title":"PHP","text":"SeAT 5 needs PHP 8.2 on the server. The provided command bellow will help you in this task and add newly required PHP extensions in the meantime.
apt-get update\napt-get install libpng-dev libfreetype6-dev libjpeg-dev\napt-get install openssl zip php8.2-fpm php8.2-bz2 php8.2-cli php8.2-curl php8.2-dom php8.2-gd php8.2-gmp php8.2-intl php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-redis php8.2-zip\n
Remember to update your NGinX configuration to use the new CGI version. To do so, open configuration file located at /etc/nginx/sites-available/seat
and replace
fastcgi_pass unix:/run/php/php7.3-fpm.sock;\n
with
fastcgi_pass unix:/run/php/php8.2-fpm.sock;\n
Restart nginx to load the changes:
systemctl restart nginx.service\n
"},{"location":"upgrading/from_seat_4_0/bare_metal/#seat","title":"SeAT","text":"Once packages have been updated, we will deploy the new SeAT's version using composer.
composer create-project eveseat/seat /var/www/seat \"5.0\" --no-dev --no-interaction\n
Once the download is done, you should have seen output such as:
76 packages you are using are looking for funding.\nUse the `composer fund` command to find out more!\n> @php artisan vendor:publish --tag=laravel-assets --ansi --force\n\nINFO Publishing [laravel-assets] assets. Copying directory [vendor/laravel/horizon/public] to [public/vendor/horizon] DONE\n Copying directory [vendor/opcodesio/log-viewer/public] to [public/vendor/log-viewer] DONE\n\nNo security vulnerability advisories found.\n> @php artisan key:generate --ansi\n\nINFO Application key set successfully.
Finally, fix directories permissions using the two commands bellow:
chown -R www-data:www-data /var/www/seat\nchmod -R guo+w /var/www/seat/storage/\n
"},{"location":"upgrading/from_seat_4_0/bare_metal/#setup","title":"Setup","text":"Now sources have been deployed, we have to update .env
configuration file. Use information from backup located at /var/www/seat4/.env
to update the newly generated file located at/var/www/seat/.env
.
Info
In case you had third party packages installed, it's time to deploy them back. We invite you to report to their own documentation regarding any specific guideline.
Warning
Please pay special attention to APP_KEY, APP_URL, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD, EVE_CLIENT_ID, EVE_CLIENT_SECRET and EVE_CALLBACK_URL parameters.
"},{"location":"upgrading/from_seat_4_0/bare_metal/#database","title":"Database","text":"We will convert database to work with new SeAT version. To do so, we're using common commands disclosed bellow:
sudo -H -u www-data bash -c 'php /var/www/seat/artisan vendor:publish --force --all'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan migrate'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan db:seed --class=Seat\\\\Services\\\\Database\\\\Seeders\\\\PluginDatabaseSeeder'\nsudo -H -u www-data bash -c 'php /var/www/seat/artisan eve:update:sde --force'\n
"},{"location":"upgrading/from_seat_4_0/bare_metal/#complete","title":"Complete","text":"Finally, restore workers states and put SeAT online using initial commands in reverse order.
Put SeAT online
sudo -H -u www-data bash -c 'php /var/www/seat/artisan up'\n
Turn workers up
systemctl start supervisor.service\n
"},{"location":"upgrading/from_seat_4_0/docker/","title":"SeAT 4.x to 5.0 (Docker)","text":"The upgrade path from SeAT 4.0 to SeAT 5.0 requires a tiny amount of manual work.
Info
Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 5. A compatibility table can be found on the Community Packages page. If you are unsure, join us on Discord so that we can tru and assist or redirect you to proper person.
Users of recursivetree/seat-info need to follow separate instructions after the migrating the core to seat 5.
Warning
Before you do anything, read and understand this entire upgrade guide.
Those instructions are valid for Docker deployment only. Please refer to bare metal instructions for a non-docker installation.
Remember to do make a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If you are currently using a docker installation for SeAT 4, upgrading is easy as never before. You need to make a few changes to your docker stack configuration, restart the stack, and you're good to go.
This guide is going to step through some quick preparation steps, then perform the upgrade and finally, check that everything worked out as expected. Let's dive in.
"},{"location":"upgrading/from_seat_4_0/docker/#tldr-upgrades","title":"tl;dr upgrades","text":"We highly recommend that you read the details of this upgrade guide to get familiar with what has changed. But, if this is your nth upgrade, maybe you just want to get the summary of everything, so here it is:
cd
to your install dir (which is probably /opt/seat-docker
) and bring the stack down with docker compose down\n
.env
file using cp .env .env.seat4.bak\n
cp docker-compose.yml docker-compose.yml.seat4.bak\n
docker-compose.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.yml -o docker-compose.yml`\n
docker-compose.mariadb.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.mariadb.yml -o docker-compose.mariadb.yml\n
docker-compose.traefik.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.traefik.yml -o docker-compose.traefik.yml\n
docker-compose.proxy.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.proxy.yml -o docker-compose.proxy.yml\n
.env
file template using curl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/.env -o .env\n
.env
file using your backup .env.seat4.bak
The table bellow is provided as a variable mapping between SeAT 4.x and SeAT 5.x. You can use it as a reference.
SeAT 4.x SeAT 5.xTRAEFIK_DOMAIN=seat.local
SEAT_DOMAIN=seat.seat.local
SEAT_SUBDOMAIN=seat
SEAT_DOMAIN=seat.seat.local
REDIS_HOST=redis
REDIS_HOST=cache
PROXY_BACKEND_HTTP_PORT=8080
LOG_LEVEL=error
Info
With SeAT 5.x, there is non longer default database and proxy. You can mix services are your needs. However, we continue to provide a few default layout usable out of the box as an option.
Using TraefikUsing reverse proxyIn case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up
Since we didn't startup the stack using daemon mode - the overall migration and process is run at front. This will allow you to detect any issue without having a container running in panic mode. When SeAT will be ready to serve your requests and have successfully been upgrade, you'll see the following output :
2023-06-02 09:49:33 ****//////////// \n2023-06-02 09:49:33 *** /// \n2023-06-02 09:49:33 *** // \n2023-06-02 09:49:33 ** ** // /// // \n2023-06-02 09:49:33 ** *** /// // ////////@@@@@@@@@@@@@@@(/////@@@//////////\n2023-06-02 09:49:33 **/ /// ///////// *///&@@@@@@@&/////#@@@@%//%///#@@@@@(///@ \n2023-06-02 09:49:33 ** *** //////// / @///////@@///@@@///@@@///@@///@@@@@(///@ \n2023-06-02 09:49:33 ** *** /// // // @@@@@////@/////////@@//////////@@@@(///@ \n2023-06-02 09:49:33 ** /// // / // *////////@@@///////@@///@@@@@@///@@@(///@ \n2023-06-02 09:49:33 *** //// /// /// \n2023-06-02 09:49:33 *** /// \n2023-06-02 09:49:33 ****////////////\n2023-06-02 09:49:33 \n2023-06-02 09:49:33 \n2023-06-02 09:49:33 SeAT is now ready to serve requests\n2023-06-02 09:49:33 \n2023-06-02 09:49:33 Open your browser and go to 'https://seat.domain.tld'\n2023-06-02 09:49:33 Run 'docker compose exec front php artisan seat:admin:login' to get a temporary link in order to sign-in as built-in admin user account (or use bellow one)\n2023-06-02 09:49:33 \n2023-06-02 09:49:33 SeAT Admin Login URL Generator\n2023-06-02 09:49:33 Checking if 'admin' is a super user\n2023-06-02 09:49:33 Generating authentication token\n2023-06-02 09:49:33 \n2023-06-02 09:49:33 Your authentication URL is valid for 60 seconds.\n2023-06-02 09:49:33 https://seat.domain.tld/auth/login/admin/aDvMAcd7GQPXFfhS3aIH9dh4opwcvASB\n2023-06-02 09:49:33 \n2023-06-02 09:49:33 \n2023-06-02 09:49:33 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message\n2023-06-02 09:49:33 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message\n2023-06-02 09:49:33 [Fri Jun 02 07:49:33.524019 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.2.6 configured -- resuming normal operations\n2023-06-02 09:49:33 [Fri Jun 02 07:49:33.524084 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'\n
Try to authenticate yourself and verify everything is working well. If you don't find any issue, you can now restart the stack in daemon mode \ud83c\udf89.
Use Ctrl+C in order to kill the stack and restart it in background:
Using TraefikUsing reverse proxydocker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up\n
docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up\n
"},{"location":"upgrading/from_seat_4_0/docker/#docker-changes-since-seat-4","title":"Docker changes since SeAT 4","text":"There have been a few minor changes to the docker-compose.yml
file. Most notably, the containers have been renamed to disclose their purpose easier, we have moved from Dockerhub to GitHub Container Registry, and the stack now has a persistent storage volume.
If you customized your docker stack deployment, it is recommended that you take a look at the new docker-compose.yml
file yourselves to see what exactly changed. Last but not least, try to avoid tuning standard files as must as possible and use override syntax instead with a docker-compose.override.yml
file (see official documentation).
Before you upgrade, you need to backup.
"},{"location":"upgrading/from_seat_4_0/docker/#backup-your-database","title":"Backup your database","text":"The single most important thing you need is a backup of your SeAT 4 database. Without a backup you will not be able to recover in case of a disaster. So, head on over to the docker db backup section and do that right now.
"},{"location":"upgrading/from_seat_4_0/docker/#backup-your-env-file","title":"Backup your env file","text":"The .env
file is the one that has your SeAT installations' configuration. It contains things like your SSO Client ID and Secret (aka: credentials). By default, SeAT docker installations live in /opt/seat-docker
meaning your .env
file will be at /opt/seat-docker/.env
. Make a copy of this file and store it somewhere safe.
First, we need to stop the SeAT 4 stack. Assuming you have the default /opt/seat-docker
location for your installation, cd to it first and then run:
docker compose down\n
The output should be similar to this:
root@seat:/opt/seat-docker# docker compose down\nStopping seat-web ... done\nStopping seat-cron ... done\nStopping seat-worker ... done\nRemoving seat-traefik ... done\nStopping seat-mariadb ... done\nStopping seat-redis ... done\nRemoving seat-web ... done\nRemoving seat-cron ... done\nRemoving seat-worker ... done\nRemoving seat-traefik ... done\nRemoving seat-mariadb ... done\nRemoving seat-redis ... done\nRemoving network seat-docker_seat-network\n
"},{"location":"upgrading/from_seat_4_0/docker/#upgrading-to-seat-5","title":"Upgrading to SeAT 5","text":""},{"location":"upgrading/from_seat_4_0/docker/#get-the-new-docker-compose-files","title":"Get the new docker-compose files","text":"Warning
If you have made customisations to how you deployed SeAT with docker-compose, then you should probably not
be replacing the compose file like we are about to do. Instead, have a look at the new one here and adapt.
Next, we will download the new SeAT 5 docker-compose files. Do that with:
mv docker-compose.yml docker-compose.yml.seat4.bak\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.yml -o docker-compose.yml\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.mariadb.yml -o docker-compose.mariadb.yml\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.traefik.yml -o docker-compose.traefik.yml\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/docker-compose.proxy.yml -o docker-compose.proxy.yml\n
With this we have created a copy of the older docker-compose file (just in case), and downloaded the new one.
"},{"location":"upgrading/from_seat_4_0/docker/#update-the-env-file","title":"Update the .env file","text":"This is one of the more important steps. The database configuration needs to be updated.
The easier is probably to download the new template and adapt variables according to your previous configuration as some of them have been removed, newest appeared and overall have been reordered.
mv .env .env.seat4.bak\ncurl -L https://raw.githubusercontent.com/eveseat/seat-docker/master/.env -o .env\n
You can refer at any time to the online version of .env
file on GitHub The table bellow is provided as a variable mapping between SeAT 4.x and SeAT 5.x. You can use it as a reference.
TRAEFIK_DOMAIN=seat.local
SEAT_DOMAIN=seat.seat.local
SEAT_SUBDOMAIN=seat
SEAT_DOMAIN=seat.seat.local
REDIS_HOST=redis
REDIS_HOST=cache
PROXY_BACKEND_HTTP_PORT=8080
LOG_LEVEL=error
"},{"location":"upgrading/from_seat_4_0/docker/#bringing-seat-5-up","title":"Bringing SeAT 5 up","text":"The only thing that is left to do is to start the stack up again. The first time we are going to start SeAT 5 we won't use the -d
flag. This is just so that you can see what's happening during the upgrade procedure. So, start SeAT with:
In case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up
You should first see some download progress bars downloading the new SeAT version.
After a while, seat should start up similar to this:
...\n\nseat_local-front-1 | mysqld is alive\nseat_local-front-1 | PONG\nseat_local-front-1 | starting web service\nseat_local-front-1 | Processing plugins from SEAT_PLUGINS\nseat_local-front-1 | Loading composer repositories with package information\nseat_local-front-1 | Info from https://repo.packagist.org: #StandWithUkraine\nseat_local-front-1 | Updating dependencies\n...\n
Warning
Do not interrupt SeAT during this phase. It will leave your database in a potentially corrupt state, meaning you are going to have to do some extra pluming to get a backup restored. Not a train smash, but not worth it.
Eventually, when everything is done you should start seeing the following output:
seat_local-front-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.5. Set the 'ServerName' directive globally to suppress this message\nseat_local-front-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.25.0.5. Set the 'ServerName' directive globally to suppress this message\nseat_local-front-1 | [Sun May 21 21:10:46.869842 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.1.19 configured -- resuming normal operations\nseat_local-front-1 | [Sun May 21 21:10:46.869944 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'\n
This is a good sign, and means everything is now ready!
"},{"location":"upgrading/from_seat_4_0/docker/#check-your-installation","title":"Check your installation","text":"The first obvious step will be to check that you can access the web UI. If not, something is probably weird with the web server configuration and needs some tweaking.
If everything seems to be working fine, you can hit ++crtl+c++ which will bring the stack down gracefully. This might take up to 30 seconds.
^CGracefully stopping... (press Ctrl+C again to force)\nStopping seat-docker_scheduler_1 ...\nStopping seat-docker_worker_1 ...\nStopping seat-docker_front_1 ...\nStopping seat-docker_traefik_1 ... done\nStopping seat-docker_cache_1 ...\n
Then, bring it back up with the -d
flag.
In case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
. You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d
Congrats, and welcome to SeAT 5!
"},{"location":"upgrading/from_seat_4_0/docker/#problems","title":"Problems","text":"Should you have any issue with the installation, please contact us on Discord.
"},{"location":"user_guides/moons_reporter/","title":"Moons Reporter","text":""},{"location":"user_guides/moons_reporter/#moons-reporter","title":"Moons Reporter","text":"Introduced in SeAT 4.0, a new tool is available to assist you in your moon management task by leveraging your intelligence desk. Like your old google/excel sheet, it will gather all your intel related to moon probing. It provides a centralized and convenient way to store reports and search through them.
Of course, like other modules, you are able to restrict its usage using ACL by choosing who can view it and/or import reports.
"},{"location":"user_guides/moons_reporter/#importing-reports","title":"Importing reports","text":"Seeding an intelligence database is usually a really long task. The Moons Reporter simplifies the process as much as possible by accepting your raw moon report collected by the in-game moon probing interface.
Here is the process which need to be follow in order to be able to import a new moon report :
That's all, SeAT will take care of your report and apply change accordingly.
Tip
You can paste multiple moon report in once - so, to gain time and save clicks, you will probably prefer to scans all moons in a system before importing them into SeAT.
Info
When importing a report targeting an already imported moon report, existing data will be erased and replaced by the new report.
Caution
In case you have to import data from an existing sheet, you will have to generate report based on your information. Please put an eye into migrate section from this documentation.
"},{"location":"user_guides/moons_reporter/#advanced-search","title":"Advanced Search","text":"The Moons Reporter is shipped with an advanced search panel (2) which allow you to search moons by different criteria :
Region, Constellation and System filters will be driven together depending on what you're doing - making your search easier.
You are able to provide multiple rank into the rank filter (like ubiquitous, common, uncommon, rare and exceptional). When you are using this filter, only moon which contain all criteria will be displayed. For example, if you are searching for a moon which contain common and uncommon materials, simply select both criteria.
Like rank filter, the produces filter is allowing you to track for moons containing multiple materials. As an example, you can search for moons producing both Vanadium and Cobalt.
To make a search, once you put your criteria, use the search button.
"},{"location":"user_guides/moons_reporter/#moon-information","title":"Moon Information","text":""},{"location":"user_guides/moons_reporter/#moon-metadata","title":"Moon Metadata","text":"Main pane (3) is showing you the list of all probed moons. You'll get quick intel on them with indicator and sovereignty columns. However, in case you want more information regarding a moon, you can click on the eye button which will show you the moon card.
Displayed sovereignty depends on public in-game collected intel regarding systems. Those data are updated once a day - after down-time.
"},{"location":"user_guides/moons_reporter/#moon-card","title":"Moon Card","text":"You are able to access details regarding a moon, simple by clicking on the eye button, located in the action column. Moon card will give you some valuable information like contained raw materials, reprocessed materials and reactions candidates.
The Moons Reporter is not only showing you types but also figures like volume, quantity and estimated value. All of them are computed based on a regular chunk of 20,000.00m3 - and upgraded to 30 days for convenience. The base reprocessing yield is 80% - however, you are able to determine which yield must be used into your user profile.
"},{"location":"user_guides/moons_reporter/#moon-stats","title":"Moon Stats","text":"Some stats are provide in Moons Reporter footer (4). They are showing you the number of raw materials, per rank, from all your scanned moons. Those stats are list in the same order as the indicator column :
Moons Reporter can only accept reports using Eve Online raw format. As a result, you will probably not be able to import data from an existing sheet without process. Luckily, the used format is quite simple to recover from collected data. You will find bellow a sample :
Moon Moon Product Quantity Ore TypeID SolarSystemID PlanetID MoonID\n\nOP9L-F II - Moon 1\n Glossy Scordite 0.300030559301 46687 30002173 40138526 40138527\n Immaculate Jaspet 0.328855156898 46682 30002173 40138526 40138527\n Pellucid Crokite 0.287893354893 46677 30002173 40138526 40138527\n Sylvite 0.083220936358 45491 30002173 40138526 40138527\n
Keep the two first lines as it, it's the report header. You will then have same format for every moon you need to put inside the report :
Moon compound line are built using :
.
a decimal separator - without thousands separator)If you need either the type name or the type identifier, you can use the amazing work from Fuzzy Steve :
Caution
Take care of separators. Report is using tabulations between column and not simple spaces. Also, each line must end with an end line and a carriage return character (CRLF - or Windows carriage return format)
"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..c0bbd2c4 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,208 @@ + +By default, SeAT uses Bootstrap 3 and the Admin LTE template.
+You may want to customise SeAT design to match either your corporation or alliance colours.
+To do so, you can use two available css hooks :
+custom-layout-mini.css
used by the sign-in pagecustom-layout.css
used by all the entier application, globallyBoth files must be located into your public
directory.
Example
+Using the default base directory, you'll get the following path :
+- /var/www/seat/public/custom-layout-mini.css
+- /var/www/seat/public/custom-layout.css
These files are loaded automatically if they are detected - you have nothing else to do to enable them.
+An example of adding these to your Web UI container is provided below:
+Note
+Do note the version in docker-compose.yml
and reflect this in your override file otherwise version mismatches will occur.
custom
directory in /opt/seat-docker/
and add files to new directorydocker-compose.override.yml
in /opt/seat-docker/
directorydocker-compose.override.yml
Note: Uncomment the needed file(s) by removing the #
Once you have placed the files you will need to run docker-compose up -d
for it to take effect.
Once you have placed the files you will need to run docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d
for it to take effect.
Once you have placed the files you will need to run docker-compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d
for it to take effect.
An example of a customized login page using custom-layout-mini.css
would be:
Note
+Valid corporations
or alliances
ids in the URL can be used for login.logo::before
section.
The above code will create the login page below:
+ + + + + + + + + +So the inevitable happened. Something broke or simply isn't working as expected! That's OK. Usually its possible to recover from almost any type of error. The only thing that you can't recover from is not making database backups!
+There are a few things you can do to perform general troubleshooting. These range from flipping SeAT into debug mode to simply running a self diagnostics command. Lets take a look at a few steps you can take:
+++ +Whoops, looks like something went wrong.
+
The dreaded "Whoops" message has appeared and now you need to figure out why. Normally, this means that something serious broke and the application simply can't recover by itself. In many cases it could either be a quick fix you can do yourself, or something that could result in the need to fix some code.
+In either case, the next steps to perform when seeing this would be to either enable debug mode and reloading the page / request that failed, or by viewing the log file while retrying the failed request.
+++Fatal error: Allowed memory size of #### bytes exhausted (tried to allocate 4096 bytes)...
+
If you are presented with an error below similar to this after "Updating Dependencies" you must append your .ENV file with COMPOSER_MEMORY_LIMIT= -1
and restart the stack with the following if you are using docker:
Note
+Note: spacing is important for this parameter, if you are unsure copy/paste the needed line into your .ENV file.
+Debug mode controls how much information about an error condition is displayed to the user. When debug mode is enabled, the error message will be extremely verbose, whereas when its disabled, it simply states that an error had occurred. In either case, the error will always be written to the logs. By default, SeAT does not have debug mode enabled. There are many reasons for this with the primary reason being security related. It goes without saying that once you have completed debugging and fixing your instance, always make sure you disable debug mode afterwards.
+Once you have enabled debug mode, any errors that may occur would look something like the following instead of the default "Whoops" message. Depending on if you have development packages installed (which you wouldn't by default in non-development installations), the debug page may look slightly different.
+ +Irrespective of how you installed SeAT, enabling debug mode is always a matter of changing the APP_DEBUG
configuration option in the .env
to `true. However, for it to apply depends on how you installed, so follow the appropriate steps below.
Assuming you installed SeAT on your host using either the SeAT tool or manually, cd to your SeAT installation directory. If you followed the guides on this documentation website, that would be in /var/www/seat
. Next, open the .env
file in a text editor and modify the line that says APP_DEBUG=false
to say APP_DEBUG=true
.
The change would immediately take effect and you can simply reload the failed request for a detailed error message and code stack trace.
+If you installed using Docker, cd to the directory where the docker-compose.yml
file is located. Assuming you followed the guides on this website, that would be in /opt/seat-docker
. Next, open the .env
file in a text editor and modify the line that says APP_DEBUG=false
to say APP_DEBUG=true
.
For the change to take effect, you need to reload the stack:
+The containers will take a few moments to settle down after which you can reload the failed the request for a detailed error message and code stack trace.
+Logs are always written to one of two log files irrespective of whether the application is in debug mode or not. Application logs go to the Laravel frameworks log files. API requests sent to ESI are stored int he Eseye log file. Logs are stored in the applications storage directory which can be found in the storage/logs
folder.
Assuming you followed the guides on this documentation site, the full path to the directory where log files are will be /var/www/seat/storage/logs/
. In the case of Docker installations, this will also be the path within the seat-web
/front
or seat-worker
/worker
container. Log files are rotated daily and are kept for a maximum of 10 days by default. Therefore, to get to todays application logs, the log file itself may be called laravel-2018-05-31.log
. To find today's ESI requests logs, the log file will be called eseye-2018-05-31.log
.
Irrespective of which log file you want to look at, getting todays live logs written to screen can be done with the following commands:
+Application Logs:
+ +Esye / ESI Logs:
+ +Application source code and log files are shared between the seat-web
/front
, seat-worker
/worker
and seat-cron
/scheduler
containers. Therefore, the following commands can be executed on any of those containers. For purposes of demonstration, we are going to tail the logs from the seat-web
/front
container.
First, enter get a shell within the seat-web
/front
container while in the /opt/seat-docker/
directory with:
Next, tail the log files you want to see.
+Application Logs:
+ +Esye / ESI Logs:
+ +A diagnostics command exists that aims to perform a number of self-checks to help you diagnose problems. This command should be run as the same user the SeAT workers are running as, which is typically either www-data
on Ubuntu / Debian based systems and nginx
on CentOS based systems. If you have created yourself a separate user for SeAT, then running the diagnose command as that user is what you need to do.
Host installs require you to first cd
to the directory where you installed SeAT. If you followed the guides on this website, that would be /var/www/seat
. Next, run the diagnose command as the user you are running the workers as. If you are the root
user, you can run it with:
For Docker installations, the only requirement to run the diagnose command would be to ensure that you are currently in the same folder as that where the stacks docker-compose.yml
file lives. If you followed the guides on this website that would be in /opt/seat-docker
. Next, run the command with:
The upgrade path from SeAT 1.x to SeAT 2.0 requires some manual work. This is mainly due to the number of fundamental changes that were made in the SeAT 2.x release.
+The way SeAT is structured has not changed much since its version 1x days. The biggest change is a Laravel framework upgrade to version 5.3. This introduced a new base layout for the application which is why the manual upgrade is needed.
+The upgrade process has a large amount of database migrations that need to run so grab a coffee depending on how big your database is!
+/var/www/seat
.If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely). Its therefore recommended that you start by putting SeAT into maintenance mode before starting the upgrade. Do this by running the following command in your SeAT path.
+ +You should see the message Application is now in maintenance mode..
+.env
file. This file contains all of your SeAT configuration. These values are needed to reconnect to the database once SeAT 2.0 is installed.Install PHP7 if you don't have it already. You can check your PHP version by running php -v
:
SeAT 2.0 can be installed in exactly the same place as where you had your v1.x installation. If you reuse this path then no webserver re-configuration will be needed. We will move the old installation out of the way, and install SeAT 2.0. To do this, run the following commands:
+You can double check that this was successful by running ls
and ensuring that there is a folder named seat.old
now.
composer create-project eveseat/seat seat --no-dev
:Next, we need to publish the new SeAT 2.0 CSS & Javascript and database migrations. This can be done with php artisan vendor:publish --force
.
.env
file¶With the new code ready to use, the next thing that is required is to reconnect the database. Remember that .env
file you backed up earlier? Refer to it for the values needed in the newly installed env file that can be found at /var/www/seat/.env
.
Important keys to populate with the correct values are:
+ +SeAT 2.0 introduced new configuration items in the .env
that you can review. There is also the option to configure Supervisor & SeAT integration, which can be done by following the admin guide titled SeAT & Supervisor Integration.
With the database reconnected, its time to run the migrations for SeAT 2.0. This is the part that may take some time, depending on how big your database is.
+To run the migrations, make sure you are still in your seat path (/var/www/seat
) and run php artisan migrate
:
You will see a bunch of messages and eventually your shell prompt again, indicating that it has completed. If you receive errors here, double check that you have entered the correct database settings in the .env
file previously mentioned.
With the database migration complete, its time to seed it with some of the static data SeAT needs. Do this with the following commands:
+The Laravel 5.3 upgrade in SeAT changed the way worker jobs are started. You can edit the command used to start a worker in your seat.conf
file in supervisor. Normally, this file will be somewhere like in /etc/supervisor/conf.d/
.
The only line you really need to edit is the one that starts with command
, replacing it with:
command=/usr/bin/php /var/www/seat/artisan queue:work --queue=high,medium,low,default --tries 1 --timeout=86100
+
A full block for SeAT 2.0 should therefore be:
+Note
+Keep in mind the user
value and the path to artisan
should be correct.
+Update them to the correct values of you made changes to the defaults.
+The user
value differs many times based on Linux distribution too!
With all of that done, bring your application back up with php artisan up
and start the supervisor workers again.
+Watch the logs for any errors in case things have not gone as expected.
+If you need any help, feel free to join the Slack channel details in the Contact page on the left.
The upgrade path from SeAT 2.x to SeAT 3.0 requires some manual work. This is mainly due to the number of fundamental database changes that were made in SeAT 3.x.
+Most of the database has been revamped to match ESI models. Therefore, we can't offer you a simple update as we do for minor patches. However, once migrated, updates can be done as per usual.
+The process described bellow handles data conversion between the SeAT 2.x structure and SeAT 3.x one.
+/var/www/seat
.If users are using your SeAT instance, or the workers are churning away in the background, then you may +risk losing some information (although unlikely). Its therefore recommended that you start by putting +SeAT into maintenance mode before starting the upgrade. Do this by running the following command in your SeAT path.
+ +If you are running this migration after CCP killed the XML API then there is probably no risk of the updaters doing anything useful anyways :D
+.env
file. This file contains all of your SeAT configuration. These values may be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat2
.
+You don't have to update any config since we will only use the command line for the process.
+mv /var/www/seat /var/www/seat2
Follow standard installation instructions for SeAT 3.0.
+Warning
+You need to keep the current SeAT 2.0 installed in order to migrate data to a newly installed 3.0 instance. +It doesn't have to be reachable from internet though since we will only use the command line for the process.
+/var/www/seat2
- unless you changed it)seat-migrator
using composer require warlof/seat-migrator
app.php
file inside the config
folder by appending Warlof\Seat\Migrator\MigratorServiceProvider::class,
to the end of providers
array.php artisan vendor:publish --force
php artisan migrate
php artisan seat:migrator:upgrade
and follow the wizardAt the end of the process, you will have most of your data transferred into the specified SeAT 3.0 database.
+Next, you can remove the seat2 directory with rm -R /var/www/seat2
and the old database.
Enjoy SeAT 3.0
+Note
+In case of any troubles, the migrator package did a backup before starting the migration process.
+The output is specified in the prompt while it is being done, but you will also find it in /var/www/seat2/storage/backup
.
The upgrade path from SeAT 3.0 to SeAT 4.0 requires some manual work. This is primarily due to large amounts of refactoring that made it into SeAT 4.
+Info
+Major changes have been made to the way packages workg together, especially the eveapi, web and services packages.
+The way jobs are queued and queues themselves have also changed, mostly to reduce resource usage and to improve fluency.
+Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 4. If you are unsure, join us on Slack so that we can tru and assist or redirect you to proper person.
+Warning
+Before you do anything, read and understand this entire upgrade guide.
+Those instructions are valid for bare metal deployment only (non-docker installation). +Please refer to docker instructions for a Docker installation.
+Remember to do a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely) - or cause crash during database conversion. +Please start to turning SeAT in maintenance mode, cutting jobs and clearing caches before starting the upgrade.
+Turn workers down, use the command
+ +Put SeAT in maintenance mode
+ +Clear cache
+ +.env
file.
+This file contains all your SeAT configuration, including tokens watermark required to update your registered users content.
+These values might be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat3
.
+You don't have to update any config since we will only use the command line for the process.
If it's not already the case, you'll have to deploy at least PHP 7.3 on the server. +The provided command bellow will help you in this task and add newly required PHP extensions in the meantime.
+Remember to update your NGinX configuration to use the new CGI version. To do so, open configuration file located at /etc/nginx/sites-available/seat
and replace
with
+ +Once packages have been updated, we will deploy the new SeAT's version using composer.
+ +Once the download is done, you should have seen output such as:
+Finally, fix directories permissions using the two commands bellow:
+ +Now sources have been deployed, we have to update .env
configuration file.
+Use information from backup located at /var/www/seat3/.env
to update the newly generated file located at /var/www/seat/.env
.
Info
+In case you had third party packages installed, it's time to deploy them back. +We invite you to report to their own documentation regarding any specific guideline.
+Warning
+Please pay special attention to APP_KEY, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, +DB_PASSWORD, EVE_CLIENT_ID, EVE_CLIENT_SECRET and EVE_CALLBACK_URL parameters.
+We will convert database to work with new SeAT version. To do so, we're using common commands disclosed bellow:
+Finally, restore workers states and put SeAT online using initial commands in reverse order.
+Put SeAT online
+ +Convert user tokens format from previous version
+ +Turn workers up
+ +SeAT 4.0 is coming with a complete revamp of permissions system. As a result, your previous roles haven't been converted. +However, they've been keep - so you can configure them with the new system.
+You will have to use built-in admin account for your first connexion.
+Info
+Super administrator is now an user flag and have to be defined at user level instead of Access Permissions. +You'll get more information regarding the new system on Admin Login and Authorizations pages.
+The upgrade path from SeAT 3.0 to SeAT 4.0 requires some manual work. This is primarily due to large amounts of refactoring that made it into SeAT 4.
+Info
+Major changes have been made to the way packages workg together, especially the eveapi, web and services packages.
+The way jobs are queued and queues themselves have also changed, mostly to reduce resource usage and to improve fluency.
+Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 4. If you are unsure, join us on Slack so that we can tru and assist or redirect you to proper person.
+Warning
+Before you do anything, read and understand this entire upgrade guide.
+Those instructions are valid for Docker deployment only. +Please refer to bare metal instructions for a non-docker installation.
+Remember to do make a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If you are currently using a docker installation for SeAT 3, you are in for a treat because upgrading is super easy. All we are going to do is bring the v4 stack up, connect your database and watch as the Docker entrypoint takes care of the rest.
+This guide is going to step through some quick preparation steps, then perform the upgrade and finally, check that everything worked out as expected. Let's dive in.
+We highly reccomend that you read the details of this upgrade guide to get familiar with what has changed. But, if this is your nth upgrade, maybe you just want to get the summary of everything, so here it is:
+cd
to your install dir (which is probably /opt/seat-docker
) and bring the stack down with docker-compose down
.env
and docker-compose.yml
files.docker-compose.yml
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/docker-compose.yml -o docker-compose.yml
..env
file with curl -L https://raw.githubusercontent.com/eveseat/seat-docker/4.x/.env -o .env
.docker-compose
installation. It should be version 1.26
and up..env
file. Important configs include the TRAEFIK_
variables, the SEAT_SUBDOMAIN
variable. Copy over existing values from your old .env
file for the EVE_CLIENT_
variables, the APP_KEY
varaible and finally the DB_
variables.docker-compose up -d
and watch the migration process.docker-compose exec seat-web php artisan eve:update:sde --force -n
🎉
+A number of changes have been made how the docker-compose stack is glued together.
+First, the docker repository for SeAT 4 has a new home here, and a new image here.
+In SeAT 3, services such as web, workers and cron were all using seperate images. For SeAT 4, we have consilidated all of that into a single image, with a service-aware entrypoint. The code for all of this lives in a new dedicated repository instead of being "hidden" away in the script repo here. All of these changes also mean that we now have the ability to properly tag the docker images instead of relying on the latest
tag like we did in SeAT 3. Finally.
Next, the default nginx
web server has been replaced with Traefik. For the majority of users this means little to no change to what you were used to. However, if you were fronting your instance with another reverse proxy, it is important to be aware of this change. The base image used for the SeAT docker image uses apache2 to serve the web UI, and Traefik reverse proxies to this, exposing it to the world. Advanced users can rip this out, expose the apache server directly and continue using the setup you have. The options are limitless.
Before you upgrade, you need to backup.
+The single most important thing you need is a backup of your SeAT 3 database. Without a backup you will not be able to recover in case of a disaster. So, head on over to the docker db backup section and do that right now.
+The .env
file is the one that has your SeAT installations' configuration. It contains things like your SSO Client ID and Secret (aka: credentials). By default, SeAT docker installations live in /opt/seat-docker
meaning your .env
file will be at /opt/seat-docker/.env
. Make a copy of this file and store it somewhere safe.
The docker-compose
binary should be upgraded so that we can make use of ${VARIABLES}
inside .env
files.
If you installed docker-compose
using your OS' package manager, upgrade the tool using that. Otherwise, a curl
invocation to download the latest version should also work.
First, we need to stop the SeAT 3 stack. Assuming you have the default /opt/seat-docker
location for your installation, cd to it first and then run:
The output should be similar to this:
+Warning
+If you have made customisations to how you deployed SeAT with docker-compose, then you should probably not be replacing the compose file like we are about to do. Instead, have a look at the new one here and adapt.
+Next, we will download the new SeAT 4 docker-compose file. Do that with:
+With this we have created a copy of the older docker-compose file (just in case), and downloaded the new one.
+The next step is to get a fresh copy of the new .env
file to use together with the new docker-compose setup. There have been a number of changes to this file (primarily as a result of the web server swap out) which we will describe in the next section.
Get it with:
+Info
+This is admitedly the hardest part of the migtation, so pay close attention. Take it slowly and think about what you are doing here.
+There are four main settings categories that need to be updated in the new .env
file. Those are:
All of these categories will be described below in detail. For all of them, you have to open the newly downloaded .env
file in a text editor and update the values. To be sure you are editing the correct file, check its header. It should say:
As mentioned earlier. The web server has been swapped out in favour of Traefik. As a result, you need to set a few configuration options to get the web UI to work. If you have a setup where you have configured something like nginx
outside of your Docker installation, we highly reccomend you just remove that and switch over to Traefik. Of anything, it's handling of TLS with Let's Encrypt is quite literally a one-time setup and forget thing.
Inside the .env
file, Traefik specific configuration options are prefixed with TRAEFIK_
. They are:
These fields need to be updated as follows:
+TRAEFIK_DOMAIN
: This is the base domain where your SeAT installation lives. For example, if your SeAT 3 installation lives at seat.domain.com, you enter domain.com here.TRAEFIK_HTTPS_PORT
: This is the external port that will be open to the world. SeAT 4 in docker with Traefik will only listen on TLS as well. Since its configured to be 443
, it will most likely clash with your external web server. We reccomend that you just disable your external web server and use Traefik. TLS configuration with it is a breeze!TRAEFIK_HTTPS_PORT
: This is the non-TLS port that Let's Encrypt (as part of the ACME protocol) will connect to during certificate renewals. SeAT will not be available here.TRAEFIK_ACME_EMAIL
: The email address used for Let's Encrypt certificate renewals.A SEAT_SUBDOMAIN
value is also present, which sets the subdomain where the SeAT web UI lives. This value needs to match what your SeAT 3 installation used, especially so that the existing SSO application you have configured on the EVE SSO portal matches the configured callback url.
By default, most folks will only configure the domain, subdomain and email and be done. Of course, if you have custom configurations and needs, feel free to adapt.
+Traefik should handle all of the relevant configuration to get your site to listen with a valid TLS certificate. The secrets for the TLS configuration in Traefik relies on an acme.json
file which you should mount into the Traefik container from the outside so that it persists restart.
Prepare the json file from within /opt/seat-docker
with:
Next, make sure you have the TRAEFIK_ACME_EMAIL
variable set, and finally, uncomment the labels that will make use of the Let's Encrypt cert resolver in the docker-compose.yml
file. By default, they will look like this, whereby you need to remove the #
in front.
(Note: the line below in docker-compose.yml
is located in two places, only remove the #
from seat-web)
Since SeAT's authentication relies on EVE's SSO, you need to configure the relevant client id and secret. You can find your old values in the backup you have made of the .env
file. The values you need to set are:
EVE_CLIENT_ID
EVE_CLIENT_SECRET
For the callback URL, ensure that you have correctly configured the SEAT_SUBDOMAIN
value in the previous step.
By default, the APP_KEY
value for a fresh .env
file will be insecure
. This is a purposefully incorrectly formatted value. You can simply set this to the value you have for the same variable in your backup .env
file.
This is one of the more important steps. The database configuration needs to match what your SeAT 3 installation used because the database data lives in a docker volume. When the stack will start up for the first time again, the SeAT 4 container will have access to the SeAT 3 database volume, and run migrations there. So, you need to copy the database credentials from the old .env
file to the new one.
The variable names have remained unchanged, but for referece they are:
+ +The only thing that is left to do is to start the stack up again. The first time we are goin to start SeAT 4 we wont use the -d
flag. This is just so that you can see what's happening during the upgrade procedure. So, start SeAT with:
You should see something like this happen when you run the above command:
+After a while, migrations should start running:
+Warning
+Do not interrupt the database migration phase. It will leave your database in a potentially corrupt state, meaning you are going to have to do some extra pluming to get a backup restored. Not a train smash, but not worth it.
+Be patient, there are many, many database changes that need to apply.
+Eventually, when everything is done you should start seeing the following output:
+This is a good sign, and means everything is now ready!
+The first obvious step will be to check that you can access the web UI. If not, something is probably weird with the web server configuration and needs some tweaking.
+If everything seems to be working fine, you can hit crtl + c
which will bring the stack down gracefully.
Then, bring it back up with the -d
flag.
SeAT 4.x is using the new CCP Token format (v2). In order to use registered tokens from your previous installation, +you'll have to run the following command:
+ +This is the final step, for real. You need to update the EVE SDE. With your stack up and running (after executing docker-compose up -d
), you can now force an SDE update with:
Congrats, and welcome to SeAT 4!
+Info
+Super administrator is now an user flag and have to be defined at user level instead of Access Permissions. +You'll get more information regarding the new system on Admin Login and Authorizations pages.
+The upgrade path from SeAT 4.0 to SeAT 5.0 requires a tiny amount of manual work.
+Warning
+Before you do anything, read and understand this entire upgrade guide.
+Those instructions are valid for bare metal deployment only (non-docker installation). +Please refer to docker instructions for a Docker installation.
+Remember to do a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
Info
+Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 5. If you are unsure, join us on Discord so that we can assist or redirect you to the proper person.
+If users are using your SeAT instance, or the workers are churning away in the background, then you may risk losing some information (although unlikely) - or cause crash during database conversion. +Please start to turning SeAT in maintenance mode, cutting jobs and clearing caches before starting the upgrade.
+Turn workers down, use the command
+Put SeAT in maintenance mode
+Clear cache
+.env
file.
+ This file contains all your SeAT configuration, including the keys to the ESI tokens required to update your registered users content.
+ These values might be useful in case of failure.Rename the current SeAT directory from /var/www/seat
to /var/www/seat4
.
+You don't have to update any config since we will only use the command line for the process.
SeAT 5 needs PHP 8.2 on the server. +The provided command bellow will help you in this task and add newly required PHP extensions in the meantime.
+Remember to update your NGinX configuration to use the new CGI version. To do so, open configuration file located at /etc/nginx/sites-available/seat
and replace
with
+ +Restart nginx to load the changes:
+Once packages have been updated, we will deploy the new SeAT's version using composer.
+Once the download is done, you should have seen output such as:
+Finally, fix directories permissions using the two commands bellow:
+ +Now sources have been deployed, we have to update .env
configuration file.
+Use information from backup located at /var/www/seat4/.env
to update the newly generated file located at/var/www/seat/.env
.
Info
+In case you had third party packages installed, it's time to deploy them back. +We invite you to report to their own documentation regarding any specific guideline.
+Warning
+Please pay special attention to APP_KEY, APP_URL, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, +DB_PASSWORD, EVE_CLIENT_ID, EVE_CLIENT_SECRET and EVE_CALLBACK_URL parameters.
+We will convert database to work with new SeAT version. To do so, we're using common commands disclosed bellow:
+Finally, restore workers states and put SeAT online using initial commands in reverse order.
+Put SeAT online
+Turn workers up
+The upgrade path from SeAT 4.0 to SeAT 5.0 requires a tiny amount of manual work.
+Info
+Before starting the upgrade, pay check the plugins you may be using and ensure that they are compatible with SeAT 5. +A compatibility table can be found on the Community Packages page. +If you are unsure, join us on Discord so that we can tru and assist or redirect you to proper person.
+Users of recursivetree/seat-info need to follow separate instructions after the migrating the core to seat 5.
+Warning
+Before you do anything, read and understand this entire upgrade guide.
+Those instructions are valid for Docker deployment only. +Please refer to bare metal instructions for a non-docker installation.
+Remember to do make a complete backup of your current database making a copy off the server where SeAT runs together with the .env
file. Both of these are the only things required to rebuilt your instance in case of failure.
If you are currently using a docker installation for SeAT 4, upgrading is easy as never before. You need to make a few changes to your docker stack configuration, restart the stack, and you're good to go.
+This guide is going to step through some quick preparation steps, then perform the upgrade and finally, check that everything worked out as expected. Let's dive in.
+We highly recommend that you read the details of this upgrade guide to get familiar with what has changed. But, if this is your nth upgrade, maybe you just want to get the summary of everything, so here it is:
+cd
to your install dir (which is probably /opt/seat-docker
) and bring the stack down with
+ .env
file using
+ docker-compose.yml
file with
+ docker-compose.mariadb.yml
file with
+ docker-compose.traefik.yml
file with
+ docker-compose.proxy.yml
file with
+ .env
file template using
+ .env
file using your backup .env.seat4.bak
The table bellow is provided as a variable mapping between SeAT 4.x and SeAT 5.x. You can use it as a reference.
+SeAT 4.x | +SeAT 5.x | +
---|---|
TRAEFIK_DOMAIN=seat.local |
+SEAT_DOMAIN=seat.seat.local |
+
SEAT_SUBDOMAIN=seat |
+SEAT_DOMAIN=seat.seat.local |
+
REDIS_HOST=redis |
+REDIS_HOST=cache |
+
+ | PROXY_BACKEND_HTTP_PORT=8080 |
+
+ | LOG_LEVEL=error |
+
Info
+With SeAT 5.x, there is non longer default database and proxy. You can mix services are your needs. +However, we continue to provide a few default layout usable out of the box as an option.
+In case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up
Since we didn't startup the stack using daemon mode - the overall migration and process is run at front. This will allow you to detect any issue without having a container running in panic mode. +When SeAT will be ready to serve your requests and have successfully been upgrade, you'll see the following output :
+Try to authenticate yourself and verify everything is working well. If you don't find any issue, you can now restart the stack in daemon mode 🎉.
+Use Ctrl+C in order to kill the stack and restart it in background:
+There have been a few minor changes to the docker-compose.yml
file. Most notably, the containers have been renamed to disclose their purpose easier, we have moved from Dockerhub to GitHub Container Registry, and the stack now has a persistent storage volume.
If you customized your docker stack deployment, it is recommended that you take a look at the new docker-compose.yml
file yourselves to see what exactly changed.
+Last but not least, try to avoid tuning standard files as must as possible and use override syntax instead with a docker-compose.override.yml
file (see official documentation).
Before you upgrade, you need to backup.
+The single most important thing you need is a backup of your SeAT 4 database. Without a backup you will not be able to recover in case of a disaster. So, head on over to the docker db backup section and do that right now.
+The .env
file is the one that has your SeAT installations' configuration. It contains things like your SSO Client ID and Secret (aka: credentials). By default, SeAT docker installations live in /opt/seat-docker
meaning your .env
file will be at /opt/seat-docker/.env
. Make a copy of this file and store it somewhere safe.
First, we need to stop the SeAT 4 stack. Assuming you have the default /opt/seat-docker
location for your installation, cd to it first and then run:
The output should be similar to this:
+Warning
+If you have made customisations to how you deployed SeAT with docker-compose, then you should probably not
+be replacing the compose file like we are about to do. Instead, have a look at the new one here and adapt.
+Next, we will download the new SeAT 5 docker-compose files. Do that with:
+With this we have created a copy of the older docker-compose file (just in case), and downloaded the new one.
+This is one of the more important steps. The database configuration needs to be updated.
+The easier is probably to download the new template and adapt variables according to your previous configuration as +some of them have been removed, newest appeared and overall have been reordered.
+You can refer at any time to the online version of .env
file on GitHub
+The table bellow is provided as a variable mapping between SeAT 4.x and SeAT 5.x. You can use it as a reference.
SeAT 4.x | +SeAT 5.x | +
---|---|
TRAEFIK_DOMAIN=seat.local |
+SEAT_DOMAIN=seat.seat.local |
+
SEAT_SUBDOMAIN=seat |
+SEAT_DOMAIN=seat.seat.local |
+
REDIS_HOST=redis |
+REDIS_HOST=cache |
+
+ | PROXY_BACKEND_HTTP_PORT=8080 |
+
+ | LOG_LEVEL=error |
+
The only thing that is left to do is to start the stack up again. The first time we are going to start SeAT 5 we won't use the -d
flag. This is just so that you can see what's happening during the upgrade procedure. So, start SeAT with:
In case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up
You should first see some download progress bars downloading the new SeAT version.
+After a while, seat should start up similar to this:
+Warning
+Do not interrupt SeAT during this phase. It will leave your database in a potentially corrupt state, meaning you are going to have to do some extra pluming to get a backup restored. Not a train smash, but not worth it.
+Eventually, when everything is done you should start seeing the following output:
+This is a good sign, and means everything is now ready!
+The first obvious step will be to check that you can access the web UI. If not, something is probably weird with the web server configuration and needs some tweaking.
+If everything seems to be working fine, you can hit ++crtl+c++ which will bring the stack down gracefully. This might take up to 30 seconds.
+Then, bring it back up with the -d
flag.
In case you want to use Traefik front of SeAT ui container, you'll need to setup the following environment variable: TRAEFIK_ACME_EMAIL
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.traefik.yml up -d
In case you want to use a custom reverse proxy front of SeAT ui container, you'll need to setup the new environment variable PROXY_BACKEND_HTTP_PORT
.
+You'll then use the following command to boot the stack docker compose -f docker-compose.yml -f docker-compose.mariadb.yml -f docker-compose.proxy.yml up -d
Congrats, and welcome to SeAT 5!
+Should you have any issue with the installation, please contact us on Discord.
+ + + + + + + + +As with anything, it is a very good idea to have backups ready before attempting any upgrades. +In the case of SeAT, the most important component needs to be backed up is the SeAT database. +Should something go wrong, then you can simply re-install SeAT, restore the database, and you should be good to go.
+As expected, updates for SeAT are deployed via images on the GitHub Container Registry. +Every package version release will automatically start the build process to generate a new docker image. +This means updates are super simple in the docker world. To update your instance, simply run:
+Better safe then sorry
+Always perform a database backup of your database before doing an update. Always.
+/var/www/seat
.composer
itself. This is not a hard requirement, but definitely recommended. Do this with:--no-dev
argument as these packages are generally not needed in production. Upgrade the packages with:Better safe then sorry
+Always perform a database backup of your database before doing an update. Always.
+You can use mysqldump -uroot -p seat > backup.sql
(change root and seat according to your configuration)
Introduced in SeAT 4.0, a new tool is available to assist you in your moon management task by leveraging your intelligence desk. +Like your old google/excel sheet, it will gather all your intel related to moon probing. +It provides a centralized and convenient way to store reports and search through them.
+Of course, like other modules, you are able to restrict its usage using ACL by choosing who can view it and/or import reports.
+ +Seeding an intelligence database is usually a really long task. The Moons Reporter simplifies the process as much as possible by accepting your raw moon report collected by the in-game moon probing interface.
+Here is the process which need to be follow in order to be able to import a new moon report :
+That's all, SeAT will take care of your report and apply change accordingly.
+Tip
+You can paste multiple moon report in once - so, to gain time and save clicks, you will probably prefer to scans all moons in a system before importing them into SeAT.
+Info
+When importing a report targeting an already imported moon report, existing data will be erased and replaced by the new report.
+Caution
+In case you have to import data from an existing sheet, you will have to generate report based on your information. +Please put an eye into migrate section from this documentation.
+The Moons Reporter is shipped with an advanced search panel (2) which allow you to search moons by different criteria :
+Region, Constellation and System filters will be driven together depending on what you're doing - making your search easier.
+You are able to provide multiple rank into the rank filter (like ubiquitous, common, uncommon, rare and exceptional). +When you are using this filter, only moon which contain all criteria will be displayed. +For example, if you are searching for a moon which contain common and uncommon materials, simply select both criteria.
+Like rank filter, the produces filter is allowing you to track for moons containing multiple materials. +As an example, you can search for moons producing both Vanadium and Cobalt.
+To make a search, once you put your criteria, use the search button.
+Main pane (3) is showing you the list of all probed moons. You'll get quick intel on them with indicator and sovereignty columns. +However, in case you want more information regarding a moon, you can click on the eye button which will show you the moon card.
+Displayed sovereignty depends on public in-game collected intel regarding systems. Those data are updated once a day - after down-time.
+You are able to access details regarding a moon, simple by clicking on the eye button, located in the action column. +Moon card will give you some valuable information like contained raw materials, reprocessed materials and reactions candidates.
+The Moons Reporter is not only showing you types but also figures like volume, quantity and estimated value. +All of them are computed based on a regular chunk of 20,000.00m3 - and upgraded to 30 days for convenience. +The base reprocessing yield is 80% - however, you are able to determine which yield must be used into your user profile.
+Some stats are provide in Moons Reporter footer (4). They are showing you the number of raw materials, per rank, from all your scanned moons. +Those stats are list in the same order as the indicator column :
+Moons Reporter can only accept reports using Eve Online raw format. As a result, you will probably not be able to import data from an existing sheet without process. +Luckily, the used format is quite simple to recover from collected data. You will find bellow a sample :
+Keep the two first lines as it, it's the report header. +You will then have same format for every moon you need to put inside the report :
+Moon compound line are built using :
+.
a decimal separator - without thousands separator)If you need either the type name or the type identifier, you can use the amazing work from Fuzzy Steve :
+ +Caution
+Take care of separators. Report is using tabulations between column and not simple spaces. +Also, each line must end with an end line and a carriage return character (CRLF - or Windows carriage return format)
+