-
Notifications
You must be signed in to change notification settings - Fork 216
docs: introduce docs on how to deploy to the platform, and help page for the licensing tool #2479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
36b093c
2b90919
137c65f
ef90395
5d12b62
f9af4ec
ae1850d
71df06f
d330fd6
b0ef8b5
46d6db7
4698804
264af2c
463be70
db99777
249daa6
bd3a7b7
c333a8d
c6e7ca8
2313713
1616bdc
4257261
0e17c1c
80f224f
f7978da
b9d8c81
d982377
f4935a3
90108de
d96cdb1
bd09acd
1658f92
44cc0e0
ec66fbf
d423241
73cc882
bc02d20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,108 @@ | ||||||
| = License management | ||||||
| :doctype: book | ||||||
| :icons: font | ||||||
|
|
||||||
| The https://licenses.timefold.ai/[Timefold License Manager] is where you register for a free trial, add and download license files, and manage your team's access to Timefold Solver Enterprise Edition. | ||||||
|
|
||||||
| == Register and free trial | ||||||
|
|
||||||
| . Go to https://licenses.timefold.ai/[licenses.timefold.ai] and click *Register*. | ||||||
| . Log in with your company email address. | ||||||
| Public email domains (Gmail, Hotmail, Yahoo, and similar) aren't accepted. | ||||||
| You must use a work email. | ||||||
| . Fill in the registration form: company name and website URL, the scheduling problem you're solving, the scale of your problem, and how you currently solve it. | ||||||
| . Accept the terms of service and click *Register*. | ||||||
|
|
||||||
| Your account and company are created immediately, and you're given a free, time-limited Enterprise trial: you can create and download fully functional Enterprise Edition license files right away, without talking to sales first. | ||||||
|
|
||||||
| The first user to register for a company automatically becomes that company's *admin*. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if this might make people hesitate, ie, they don't want to be/shouldn't be the company admin. It might be worth a note stating that can be easily changed. |
||||||
|
|
||||||
| When the trial ends, you need a paid subscription to keep creating new licenses. | ||||||
|
|
||||||
| == Managing licenses | ||||||
|
|
||||||
| Creating licenses requires the *admin* role within your company. | ||||||
| Regular users can view and download their own licenses only. | ||||||
|
|
||||||
| === View your licenses | ||||||
|
|
||||||
| Click *Licenses* in the sidebar to see your active licenses, or switch to the *Expired* tab to see past ones. | ||||||
| Each license card shows its type, expiration date, and a download button. | ||||||
|
|
||||||
| .The Licenses list in the Timefold License Manager | ||||||
| image::commercial-editions/license-manager-view-licenses.png[The Licenses list in the Timefold License Manager, showing active license cards with type, expiration date, and a download button] | ||||||
|
|
||||||
| === Add a license | ||||||
|
|
||||||
| . Click *Licenses* → *Add license key*. | ||||||
| . Select an expiration date. | ||||||
| It can't exceed your company's contract end date. | ||||||
| . Optionally, assign the license to a specific user in your company. | ||||||
| . Click *Add license key*. | ||||||
|
|
||||||
| Your company's plan determines the license type; you don't need to select it manually. | ||||||
|
|
||||||
| === Download a license key | ||||||
|
|
||||||
| Click *Download license key* next to a license to get its `.pem` file. | ||||||
| Introduce it to your project as described in xref:commercial-editions/installation.adoc#solverSetupLicenseKey[Set up your license key]. | ||||||
|
|
||||||
| [IMPORTANT] | ||||||
| ==== | ||||||
| Treat your license key as a secret. | ||||||
| Don't commit it to source control; inject it at runtime using your secret manager instead (for example Kubernetes Secrets, AWS Secrets Manager, HashiCorp Vault, or a CI/CD secret store). | ||||||
| ==== | ||||||
|
|
||||||
| === Expired licenses | ||||||
|
|
||||||
| Expired licenses remain visible under the *Expired* tab, and you can still download them to review, but they're no longer accepted by the solver. | ||||||
|
|
||||||
| [IMPORTANT] | ||||||
| ==== | ||||||
| Once a license expires, Timefold Solver refuses to start. | ||||||
| There is no grace period. | ||||||
| Renew your license before it expires to avoid downtime. | ||||||
| ==== | ||||||
|
|
||||||
| == Notifications | ||||||
|
|
||||||
| === Email reminders | ||||||
|
|
||||||
| The license manager emails the license owner before a license expires: seven days before, and again one day before. | ||||||
| If you're not receiving these emails, check your spam folder or ask your company admin to verify the license owner's address. | ||||||
|
|
||||||
| === Solver warnings | ||||||
|
|
||||||
| Timefold Solver also logs warnings as a license approaches expiry, with increasing urgency at less than 30 days, less than 14 days, and less than one day remaining. | ||||||
| Once expired, the solver refuses to start. | ||||||
| Monitor your application logs for these warnings so you have time to renew. | ||||||
|
|
||||||
| == Managing your team | ||||||
|
|
||||||
| Inviting and managing team members requires the *admin* role within your company. | ||||||
|
|
||||||
| === Invite team members | ||||||
|
|
||||||
| Open your company from the sidebar, go to the *Users* tab, and click *Invite user*. | ||||||
| The invitee receives an email with an acceptance link valid for 14 days. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Once they accept, they join your company with the *user* role. | ||||||
|
|
||||||
| If an invitation expires or wasn't received, find it in the *Users* tab and click *Resend* to send a fresh 14-day link. | ||||||
|
|
||||||
| === Change a user's role or remove a user | ||||||
|
|
||||||
| From the *Users* tab, click *Edit* next to a user to change their role between *admin* and *user*, or click *Delete* to remove them. | ||||||
|
|
||||||
| NOTE: At least one admin must remain in a company at all times; you can't demote or delete the last admin. | ||||||
|
|
||||||
| == Account and company settings | ||||||
|
|
||||||
| Update your name from your avatar menu → *Settings*. | ||||||
| Your identity provider manages your email address, so you can't change it there. | ||||||
|
|
||||||
| Only Timefold can change company-level settings, such as your plan and contract dates. | ||||||
| Contact mailto:support@timefold.ai[support@timefold.ai] if you need your plan updated. | ||||||
|
|
||||||
| == Pricing | ||||||
|
|
||||||
| Visit https://licenses.timefold.ai/pricing[the pricing page] for current Enterprise pricing and contact details. | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [IMPORTANT] | ||
| ==== | ||
| Deploying custom models to the platform is in preview. | ||
| This is currently only available to a limited set of partners. | ||
| If you're interested in joining this preview program, mailto:info@timefold.ai[get in touch with the Timefold team] to discuss access. | ||
| ==== |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,136 @@ | ||||||
| = Getting started: deploying to the platform (Preview) | ||||||
| :description: Deploy the service you built to Timefold Platform | ||||||
| :doctype: book | ||||||
| :sectnums: | ||||||
| :icons: font | ||||||
|
|
||||||
| include::../_attributes.adoc[] | ||||||
|
|
||||||
| This guide continues from xref:quickstart/service/getting-started.adoc[Getting started: building a service], where you built the School Timetabling model as a service. | ||||||
| It walks you through deploying that same model to Timefold Platform, so it can be reached through a managed, multi-tenant REST API instead of `mvn quarkus:dev` on your own machine. | ||||||
|
|
||||||
| For the reasoning behind why you'd want to do this, see xref:deploying-to-platform/introduction.adoc[Deploying to the Timefold Platform]. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
PP you could also include "Learn more about the benefits of Deploy..." |
||||||
|
|
||||||
| include::_preview-note.adoc[] | ||||||
|
|
||||||
| [sectnums!] | ||||||
| == Prerequisites | ||||||
|
|
||||||
| To complete this guide, you need: | ||||||
|
|
||||||
| * The School Timetabling service built in xref:quickstart/service/getting-started.adoc[Getting started: building a service]. | ||||||
| * A Timefold Platform account with tenant-admin access to the tenant you want to register the model in. | ||||||
| * A Personal Access Token (PAT), scoped to the tenant you want to register the model in, with *Create*, *Read*, *Update*, and *Delete* permissions on the *Registered Model* resource. | ||||||
| See xref:#_generate_a_personal_access_token[Generate a Personal Access Token] below. | ||||||
| * Push access to Timefold's container registry, since the `configure` goal builds and pushes your model's container image there. | ||||||
| This access needs to be requested; mailto:info@timefold.ai[get in touch with the Timefold team] before you try to deploy. | ||||||
|
|
||||||
| NOTE: Timefold Platform requires your model to be built with the Enterprise Edition of Timefold Solver, but building doesn't require a license, only running it does, and the platform provides that license when your model runs there. See xref:#_enterprise_edition[Build with the Enterprise Edition] below. | ||||||
|
|
||||||
| [#_add_the_maven_plugin] | ||||||
| == Add the Maven plugin | ||||||
|
|
||||||
| The `timefold-maven-plugin` connects your build to the platform's container registry and handles registering your model. | ||||||
| Add it to your `pom.xml`, and configure it with your `platformUrl`, a registration `key` for your model, and the tenant(s) to register it under. | ||||||
|
|
||||||
| Your `platformUrl` will typically be `https://app.timefold.ai`. | ||||||
| (See https://docs.timefold.ai/timefold-platform/latest/api/integration-scenarios/integration-scenarios#_our_recommendation[Integration scenarios] if you're deploying to a different installation, for example a self-hosted platform or a different data residency region.) | ||||||
|
|
||||||
| Also set `handleSubscription` to `true`, so your tenant gets subscribed to the model when you deploy it; see xref:#_what_happens_on_deploy[What happens on deploy] below. | ||||||
|
|
||||||
| Follow the setup instructions in the https://github.com/TimefoldAI/timefold-solver/blob/main/service/tools/maven-plugin/README.adoc[Maven plugin documentation] to add and configure it. | ||||||
|
|
||||||
| [#_enterprise_edition] | ||||||
| == Build with the Enterprise Edition | ||||||
|
|
||||||
| Timefold Platform requires your model to be built with the Enterprise Edition of Timefold Solver; a Community Edition build cannot be deployed. | ||||||
| By default, your build uses the Community Edition, so you need to opt in explicitly. | ||||||
| This also gets you the xref:deploying-to-platform/introduction.adoc#_enterprise_edition_features[Enterprise Edition features] surfaced by the platform, such as score analysis. | ||||||
|
|
||||||
| Build with `-Denterprise=true` to activate the `enterprise` Maven profile defined in `timefold-solver-service-parent`, which pulls in the Enterprise Edition dependencies: | ||||||
|
|
||||||
| [source,bash,options="nowrap"] | ||||||
| ---- | ||||||
| mvn clean package -Denterprise=true | ||||||
| ---- | ||||||
|
|
||||||
| The Enterprise Edition requires a license key to function at runtime, as described in xref:commercial-editions/installation.adoc[Installation]. | ||||||
| Building with the Enterprise Edition does not require a license; a license is only checked when the model actually runs. | ||||||
| When you deploy to Timefold Platform, the platform provides that license for you, so you don't need one of your own just to follow this guide. | ||||||
|
|
||||||
| You still may want a license if you want to run your Enterprise Edition build locally, for example to test the model with `mvn quarkus:dev` before deploying it. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| Every new account on the xref:commercial-editions/license-management.adoc[Timefold License Manager] starts with a free, time-limited Enterprise trial, so you can create and download fully functional Enterprise Edition license files without talking to sales first. | ||||||
| We also offer free licenses to non-profit organizations and for academic research. | ||||||
|
|
||||||
| [#_authenticate] | ||||||
| == Authenticate | ||||||
|
|
||||||
| [#_generate_a_personal_access_token] | ||||||
| === Generate a Personal Access Token | ||||||
|
|
||||||
| Generate a PAT from your user menu on the platform (*User menu → Access tokens → Generate new token*). | ||||||
| When selecting its permissions, scope the token to the tenant you want to register the model in, and grant *Create*, *Read*, *Update*, and *Delete* on the *Registered Model* resource, since the plugin needs all four to register, update, and later undeploy your model. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| See https://docs.timefold.ai/timefold-platform/latest/api/platform-api#_authentication_with_personal_access_tokens[Authentication with Personal Access Tokens] for the full walkthrough, including screenshots of the token generation dialog. | ||||||
|
|
||||||
| === Export the token | ||||||
|
|
||||||
| The plugin reads your PAT from the `TIMEFOLD_PAT` environment variable. | ||||||
| Export it before building: | ||||||
|
|
||||||
| [source,bash,options="nowrap"] | ||||||
| ---- | ||||||
| export TIMEFOLD_PAT=<your-personal-access-token> | ||||||
| ---- | ||||||
|
|
||||||
| [#_build_and_deploy] | ||||||
| == Build and deploy | ||||||
|
|
||||||
| Build and deploy your model in a single command. | ||||||
| `-Denterprise=true` is required, since the platform only accepts models built with the Enterprise Edition; see xref:#_enterprise_edition[Build with the Enterprise Edition] above. | ||||||
|
|
||||||
| [source,bash,options="nowrap"] | ||||||
| ---- | ||||||
| mvn clean package -Denterprise=true timefold:deploy | ||||||
| ---- | ||||||
|
|
||||||
| === Preview without pushing container | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| To preview what would happen without actually pushing the container image or registering the model, add `-Dtimefold.dryRun=true`. | ||||||
| This logs the requests that would have been made instead of sending them. | ||||||
|
|
||||||
| [#_what_happens_on_deploy] | ||||||
| === What happens on deploy | ||||||
|
|
||||||
| During `package`, the build generates a model descriptor (`target/timefold/timefold-model-descriptor.json`) and packages it together with the OpenAPI specification, JSON schemas, and default configuration profile into `target/model-descriptor.zip`. | ||||||
|
|
||||||
| The `timefold:deploy` goal uploads that archive and registers it against the platform's model registration endpoint (`POST /api/platform/v1/models`), using the `key` and `tenants` from the plugin configuration. | ||||||
|
|
||||||
| If a model with the same `key` is already registered, the deploy fails with a conflict (HTTP 409) unless `overwrite` is enabled, in which case the existing registration is updated instead (`PATCH /api/platform/v1/models/<key>`). | ||||||
| You can also set this from the command line with `-Dtimefold.model.overwrite=true`. | ||||||
|
|
||||||
| Registering a model does not automatically subscribe your tenant to it; with `handleSubscription` set to `true`, the plugin also subscribes your tenant when it registers the model. | ||||||
| Without it, your tenant won't see the model on the platform after you deploy it. | ||||||
|
|
||||||
| [#_verify_on_the_platform] | ||||||
| == Verify on the platform | ||||||
|
|
||||||
| Log in to the platform UI at your `platformUrl` and find the model under your tenant. | ||||||
| Before considering the model ready for review, confirm the following: | ||||||
|
|
||||||
| * *The model shows up in your tenant*: go to *Manage tenant → Models* and confirm your model is listed, with the version details (major API version, and the current minor version's build time, commit, and solver version) matching what you just deployed. | ||||||
| If it's missing, double check that `handleSubscription` is set to `true` in the Maven plugin configuration. | ||||||
| * *It solves*: submit your xref:running-timefold-solver/service/demo-data.adoc[demo dataset] and confirm the solve completes with a reasonable score. | ||||||
| * *The output looks right*: inspect the resulting schedule and check that lessons are assigned sensible timeslots and rooms. | ||||||
| * *Constraints show up by name in score analysis*: the score analysis breakdown should show your constraints under human-readable names, not raw identifiers. | ||||||
| This requires the richer constraint metadata described in xref:deploying-to-platform/model-metadata.adoc#_constraint_descriptions_and_groups[Constraint descriptions and groups]. | ||||||
| * *Input and output metrics show up*: the dataset view should display the metrics you exposed, as described in xref:deploying-to-platform/metrics.adoc[Using metrics]. | ||||||
| * *You can add a configuration profile*: add a new configuration profile in the UI and override one of your xref:running-timefold-solver/service/constraint-overrides.adoc[constraint weights], then confirm a re-solve picks up the new weight. | ||||||
| See xref:deploying-to-platform/model-metadata.adoc#_configuration_profiles[Configuration profiles] for the properties that define the default profile shipped with your model. | ||||||
|
|
||||||
| [sectnums!] | ||||||
| == Next | ||||||
|
|
||||||
| * Learn about the platform-specific metadata that shapes your model's UI experience: xref:deploying-to-platform/model-metadata.adoc[Platform model metadata]. | ||||||
| * Make solve graphs, comparison, and Insights more useful by adding xref:deploying-to-platform/metrics.adoc[input and output metrics]. | ||||||
| * Read more about xref:running-timefold-solver/service/overview.adoc[Building a service]. | ||||||
| * See the https://github.com/TimefoldAI/timefold-solver/blob/main/service/tools/maven-plugin/README.adoc[Maven plugin documentation] for the full set of goals and parameters, including how to undeploy a model. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We expect to need this in multiple places, it would be partializify it in the shared repo.