diff --git a/Documentation/5.1/Raven.Documentation.Pages/start/installation/setup-wizard.markdown b/Documentation/5.1/Raven.Documentation.Pages/start/installation/setup-wizard.markdown index 13e4b18fc2..10545505bc 100644 --- a/Documentation/5.1/Raven.Documentation.Pages/start/installation/setup-wizard.markdown +++ b/Documentation/5.1/Raven.Documentation.Pages/start/installation/setup-wizard.markdown @@ -1,31 +1,38 @@ # Installation: Setup Wizard Walkthrough - -* We want to make it as easy as possible for you to start RavenDB with a valid, trusted server certificate from the beginning. - This will ensure that your servers are secure throughout your application lifecycle. - - * Setting up securely will create a development environment that includes security related features such as encryption and client certificates. - This way, such features won't be missing when you launch, and there will be less bugs caused by code that needs to be adapted to - security features that must be added later. - -* To make the setup process as smooth as possible, we have introduced the **Setup Wizard**, - a step-by-step guide to help you configure the desired security level and easily deploy a secure cluster. - -* Using the Setup Wizard you can set up a secure cluster with: - * **Let's Encrypt certificate** - Using the Wizard with "Let's Encrypt" will enable RavenDB's automatic certificate renewals. - * **Self-obtained certificate** - You are responsible for periodic certificate renewals. - * Or choose to continue in an **unsecure mode**. - -* Note: The RavenDB server can also be **set up manually** if choosing not to use the wizard. - See [Manual Setup](../../start/installation/manual). - -* Note: this page explains how to follow the Setup Wizard, without going into security concerns details. - To learn more about how _Authentication_ and _Authorization_ are implemented with RavenDB, and about _Security_ in general, - go to [Security Overview](../../server/security/overview). - -* If you are having trouble using the wizard, or with security in general, please visit the [Security Common Errors & FAQ](../../Server/Security/common-errors-and-faq) section. +* The **Setup Wizard** guides you through a step-by-step installation of a RavenDB server. + +* You can use the wizard to install either a **secure** or an **unsecure** server. + * An **unsecure server** can be used for **trial and development**, providing there + is no issue with unauthorized access to the server and the data stored in it. + * It is **highly recommended** to use a **secure server** wherever access to the + server, its management, or its data should be restricted. + * You will also need a secure server in a development environment that requires + the usage of security related features like encryption and client certificates. + +* When installing a secure server, connecting it will thereafter be possible only + for clients that own a valid, trusted certificate. + To secure the server throughout its lifecycle, you can provide a suitable certificate + during setup. The setup wizard allows you to either - + * Generate and use a **Let's Encrypt certificate**, + saving you the bother of providing your own certificate, and making it possible + for RavenDB to renewal the certificate automatically from now on, + * -or- Provide a **self-obtained certificate**, + leaving you responsible for periodic certificate renewals. + +{INFO: Additional resources} + +* This page explains how to follow the setup wizard, without going into security concerns details. + Learn more about _authentication_, _authorization_, and _security_ in RavenDB in: + [Security overview](../../server/security/overview) + +* Another helpful resource about setup and security: [Security common errors & FAQ](../../Server/Security/common-errors-and-faq) + +* To learn how to **install RavenDB manually** rather than via the setup wizard: [Manual setup](../../start/installation/manual) +{INFO/} * In this page: + * [Run the Setup Wizard](../../start/installation/setup-wizard#run-the-setup-wizard) * [Select Setup Mode](../../start/installation/setup-wizard#select-setup-mode) * [Secure Setup with a Free Let's Encrypt Certificate](../../start/installation/setup-wizard#secure-setup-with-a-free-let) * [Configuring The Server Addresses](../../start/installation/setup-wizard#configuring-the-server-addresses) @@ -57,6 +64,20 @@ appearing: --- +{PANEL: Run the Setup Wizard} + +To install RavenDB, you can: + +* Download the RavenDB version you want to install from the [Downloads](https://ravendb.net/download) page. +* Extract the downloaded archive to a folder on your machine. +* Open a command prompt (e.g. PowerShell) and navigate to the setup folder. +* Run setup: + {CODE-BLOCK: plain} + .\run.ps1 + {CODE-BLOCK/} + +{PANEL/} + {PANEL:Select Setup Mode} When running the RavenDB server for the first time, you will be redirected @@ -71,33 +92,33 @@ to the setup wizard welcome page where you can choose your preferred option. [Let's Encrypt](https://letsencrypt.org/) is a free, automated, and non-profit certificate authority. It will generate a certificate for your domain as long as you can prove that you own it. -During the wizard, RavenDB will give you a free subdomain. This will let you configure the DNS records for -this subdomain to point to the IP addresses your server will listen to. The subdomain is owned by RavenDB, and you can manage it -through our [Customer Portal](https://customers.ravendb.net). Login with your license key, and you can add/remove/update DNS -records for your cluster. +During setup, RavenDB will provide you with a free subdomain and allow you to configure its DNS records +with the IP addresses that your server will listen on. +The subdomain is owned by RavenDB, and you can manage it through the [Customer Portal](https://customers.ravendb.net). +Login with your license key, and you can add/remove/update DNS records for your cluster. -The free subdomain is given to you only for the purpose of proving ownership to Let's Encrypt. If you wish to use your own domain, -you are welcome to acquire your own certificate and use that instead. +The free subdomain is given to you only for the purpose of proving ownership to Let's Encrypt. +If you wish to use your own domain, you are welcome to acquire your own certificate and use it instead. {WARNING: Security consideration and ownership of certificates and domains} The automatic setup is designed to be as convenient and as easy as possible. It takes care of all the details of setting up DNS records, generating certificates, and performing their renewals. Because of these requirements, the ownership of the certificates -and DNS records needs to stay within the Hibernating Rhinos company. This gives us the ability to generate valid certificates and +and DNS records needs to stay within the RavenDB company. This gives us the ability to generate valid certificates and modify DNS settings for your registered domains and should be a consideration to keep in mind while reviewing the security of your system. -Hibernating Rhinos will **never** exploit these abilities and will never perform any modifications to the certificates and DNS +We will never exploit these abilities and never perform any modifications to the certificates and DNS records unless explicitly requested by the client. -The purpose of this feature is to make it easy for users to get set up and running with a minimum of fuss. We recommend that -**for actual production deployments** and for the highest level of security and control, you'll -[use your own certificates and domains](../../start/installation/setup-wizard#secure-setup-with-your-own-certificate), +The purpose of this feature is to make it easy for users to get set up and running with the minimum fuss. +We recommend that **for actual production deployments** and for the highest level of security and control, +you will [use your own certificates and domains](../../start/installation/setup-wizard#secure-setup-with-your-own-certificate), avoiding the need to rely on a third party for such a critical part of your security. {WARNING/} After choosing the Let's Encrypt Secure Setup option, you are required to enter your license key which was sent to the email -address you provided. This process will associate your license with the chosen subdomain to ensure that valid certificates can +address you provided. This process will associate your license with your subdomain to ensure that valid certificates can only be generated by a single license holder. ![Enter License](images/setup/3.png "Enter License") diff --git a/Documentation/5.2/Raven.Documentation.Pages/server/configuration/license-configuration.markdown b/Documentation/5.2/Raven.Documentation.Pages/server/configuration/license-configuration.markdown index 63b9e71bf1..f5838e3cd3 100644 --- a/Documentation/5.2/Raven.Documentation.Pages/server/configuration/license-configuration.markdown +++ b/Documentation/5.2/Raven.Documentation.Pages/server/configuration/license-configuration.markdown @@ -2,10 +2,10 @@ {PANEL:License} -* When using this configuration key in _settings.json_ embed the license key as a __string__, e.g.: +* When using this configuration key in _settings.json_ embed the license key as a **string**, e.g.: `"License": "{ paste your license key including curly brackets here }"`. -* When using this configuration key as an [environment variable](../../server/configuration/configuration-options#environment-variables) embed the JSON license key __object__. +* When using this configuration key as an [environment variable](../../server/configuration/configuration-options#environment-variables) embed the JSON license key **object**. * If `License` is specified, it overrides the `License.Path` configuration. @@ -22,10 +22,10 @@ Save the license key to a `license.json` file. Provide the path to this file in the 'License.Path' configuration key: - * Either the __full__ path to the license file, e.g.: + * Either the **full** path to the license file, e.g.: `"License.Path": "D:\\RavenDB\\Server\\license.json"` - * Or, a __relative__ path to the license file from the Server folder, e.g.: + * Or, a **relative** path to the license file from the Server folder, e.g.: `"License.Path": "License\\license.json"` (where 'License' folder is under the 'Server' folder) diff --git a/Documentation/5.4/Raven.Documentation.Pages/server/Embedded.dotnet.markdown b/Documentation/5.4/Raven.Documentation.Pages/server/Embedded.dotnet.markdown index 7d6706f59f..a51f65a2b2 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/server/Embedded.dotnet.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/server/Embedded.dotnet.markdown @@ -8,18 +8,20 @@ * In this page: * [Overview](../server/embedded#overview) - * [Prerequisites](../server/embedded#prerequisite) + * [Prerequisites and Recommendations](../server/embedded#prerequisites-and-recommendations) * [Installation](../server/embedded#installation) - * [Starting the Server](../server/embedded#starting-the-server) - * [Server Options](../server/embedded#server-options) - * [Setting Server Directory](../server/embedded#setting-server-directory) - * [Restarting the Server](../server/embedded#restarting-the-server) + * [Starting the server](../server/embedded#starting-the-server) + * [Server options](../server/embedded#server-options) + * [Setting server directory](../server/embedded#setting-server-directory) + * [Restarting the server](../server/embedded#restarting-the-server) * [ServerProcessExited Event](../server/embedded#serverprocessexited-event) - * [Licensing options](../server/embedded#licensing-options) - * [.NET FrameworkVersion](../server/embedded#.net-frameworkversion) + * [Embedded server licensing](../server/embedded#embedded-server-licensing) + * [Licensing configuration options](../server/embedded#licensing-configuration-options) + * [License an embedded server using an Environment variable](../server/embedded#license-an-embedded-server-using-an-environment-variable) + * [`.NET` FrameworkVersion](../server/embedded#.net-frameworkversion) * [Security](../server/embedded#security) - * [Document Store](../server/embedded#document-store) - * [Get Server URL and Process ID](../server/embedded#get-server-url-and-process-id) + * [Document store](../server/embedded#document-store) + * [Get server URL and process ID](../server/embedded#get-server-url-and-process-id) * [Remarks](../server/embedded#remarks) {NOTE/} @@ -28,7 +30,8 @@ {PANEL: Overview} -RavenDB makes it very easy to be embedded within your application, with RavenDB Embedded package you can integrate your RavenDB server with a few easy steps. +RavenDB can be easily embedded in your application. +Use the Embedded package to integrate RavenDB in just a few easy steps. {CODE-TABS} {CODE-TAB:csharp:Sync embedded_example@Server\Embedded.cs /} @@ -37,45 +40,46 @@ RavenDB makes it very easy to be embedded within your application, with RavenDB {PANEL/} -{PANEL: Prerequisite} +{PANEL: Prerequisites and Recommendations} -There is one prerequisite and one recommendation for the Embedded package: +* **Prerequisites** + * Install [`.NET` Core runtime](https://dotnet.microsoft.com/en-us/download), + either manually or [along with a RavenDB full version](embedded#setting-server-directory). + * Verify that the RavenDB server [FrameworkVersion](../server/embedded#net-frameworkversion) + definition matches the `.NET` Core version that you install. -Prerequsite: - -- Install [.NET Core runtime](https://dotnet.microsoft.com/en-us/download) either manually or [along with a RavenDB full version](embedded#setting-server-directory) - - Be sure that the RavenDB server [FrameworkVersion](../server/embedded#net-frameworkversion) definition matches the .NET Core - version that you install. - -Recommendation: - -- **Projects targeting .NET Framework 4.6.1+** that use old `packages.config` for maintaining NuGet packages should be **migrated to - `PackageReference` package management** (please refer to section below on how to achieve this) +* **Recommendations** + * Projects targeting `.NET Framework 4.6.1+` that use the old `packages.config` + for NuGet packages maintenance, should migrate to `PackageReference` package management. + Find additional details [below](../server/embedded#migrating-from--to--in-old-csproj-projects). --- -### .NET Core Runtime: +### `.NET` Core Runtime: -RavenDB Embedded **does not include .NET Core runtime required for it to run**. +RavenDB Embedded **does not include** the `.NET` Core runtime engine required for its operation. -By default, the `ServerOptions.FrameworkVersion` is set to the .NET Core version that we compiled the server with and -`ServerOptions.DotNetPath` is set to `dotnet` meaning that it will require to have it declared in PATH. +By default, `ServerOptions.FrameworkVersion` is set to the `.NET` Core version that we compiled +the server with and `ServerOptions.DotNetPath` is set to `dotnet` - meaning it is required to have +it declared in PATH. -We highly recommend using the .NET Core framework version defined in `ServerOptions.FrameworkVersion` for proper functioning -of the Server. The .NET Core runtime can be downloaded from [here](https://dotnet.microsoft.com/download). +We highly recommend using the `.NET` Core framework version defined in `ServerOptions.FrameworkVersion` +for proper server function. +You can download the `.NET` Core runtime engine [here](https://dotnet.microsoft.com/download). --- ### Migrating from `packages.config` to `PackageReference` in old csproj projects: -Due to the NuGet limitations, we recommend that the Embedded package should be installed via newer package management using -`PackageReference` instead of old `packages.config`. +Due to NuGet limitations, we recommend installing the Embedded package via newer package management, +using `PackageReference` rather than the older `packages.config`. -The transition between those two is easy due to built-in into Visual Studio 2017 migrator written by Microsoft. Please read -following [article](https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference) written by Microsoft that will guide you through the process. +The transition between the two is made easy by the built-in Visual Studio migrator. +Find further guidance in this [Microsoft article](https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference). -Please note that **binding redirects** in `App.config` are still required when 'PackageReference' is used in old csproj projects. -Not doing so might result in an assembly load exception e.g. +Please note that _binding redirects_ in `App.config` are still required when 'PackageReference' +is used in old `csproj` projects. Failing to use _binding redirects_ might result in an assembly +load exception such as: ``` Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, @@ -110,8 +114,8 @@ match the assembly reference. (Exception from HRESULT: 0x80131040) {PANEL: Installation} -* Create a new project (.NET Standard 2.0+, .NET Core 2.0+, .NET Framework 4.6.1+). -* Grab the package from our [NuGet](https://www.nuget.org/packages/RavenDB.Embedded) +* Create a new project (.`NET Standard 2.0+`, `.NET Core 2.0+`, `.NET Framework 4.6.1+`). +* Grab our [NuGet package](https://www.nuget.org/packages/RavenDB.Embedded) {CODE-BLOCK:powershell} Install-Package RavenDB.Embedded -Version 4.1.0 {CODE-BLOCK/} @@ -121,18 +125,18 @@ Install-Package RavenDB.Embedded -Version 4.1.0 {PANEL: Starting the Server} RavenDB Embedded Server is available under `EmbeddedServer.Instance`. -In order to start it, call `StartServer` method. +Start the server using the `StartServer` method. {CODE start_server@Server\Embedded.cs /} -For more control on how to start the server, pass to `StartServer` method a `ServerOptions` object. +For more control over the server startup, pass `StartServer` a `ServerOptions` object. {PANEL/} {PANEL: Server Options} -Set `ServerOptions` to change server settings such as .NET FrameworkVersion, DataDirectory, -and additional options: +Set `ServerOptions` to change server settings such as `.NET` FrameworkVersion, DataDirectory, +and additional options. | Name | Type | Description | | ------------- | ------------- | ----- | @@ -151,12 +155,12 @@ If `ServerOptions` is not provided, RavenDB server will start with a default val --- ### Setting Server Directory: -In case you're not interested in installing the .NET run-time environment on your system, you can - +In case you are not interested in installing the `.NET` run-time environment on your system, you can - * [Download](https://ravendb.net/download) a full RavenDB version. - This version already includes a .NET run-time environment. + This version already includes a `.NET` run-time environment. * Extract the downloaded version to a local folder. - E.g. `C:\RavenDB`. + E.g. `C:\RavenDB` * Set the `ServerDirectory` server option to the RavenDB subfolder that contains - * `Raven.Server.exe` in Windows * `Raven.Server` in Posix @@ -166,7 +170,7 @@ In case you're not interested in installing the .NET run-time environment on you --- ### Restarting the Server: -To restart the server, use the method `.RestartServerAsync()`. +To restart the server, use the `.RestartServerAsync()` method. {CODE-BLOCK:csharp} public async Task RestartServerAsync(); @@ -187,61 +191,133 @@ event EventHandler? ServerProcessExited; Event data is of type `ServerProcessExitedEventArgs`. +{PANEL/} + +{PANEL: Embedded server licensing} + +* The **same license types** available for Standalone RavenDB servers, are available for Embedded servers. +* A licensed server can be managed using Studio, and is given a superior feature set to that of + non-registered servers. See the full list of license types and their features [here](https://ravendb.net/buy). +* An embedded server can be licensed using **Configuration options** or an **Environment variable**. + +--- + +### Licensing configuration options + +Embedded server licensing configuration options are gathered in the `ServerOptions.Licensing` class. +After acquiring a license, it can be passed to the server either as a string or as a file. + +* To pass your license to the server as a string, use the `ServerOptions.LicensingOptions.License` + configuration option. + {CODE LicensingOptions_License@Server\Embedded.cs /} +* To keep your license file in your file system and point the server to its path, + use the `ServerOptions.LicensingOptions.LicensePath` configuration option. + {CODE LicensingOptions_LicensePath@Server\Embedded.cs /} + --- -### Licensing options: -A `ServerOptions.Licensing` class gathers configuration options related to the licensing of the embedded server: +#### Available LicensingOptions configuration options: | Name | Type | Description | | ------------- | ------------- | ----- | | **License** | `string` | Specifies the full license string directly in the configuration.
If both `License` and `LicensePath` are defined, `License` takes precedence. | | **LicensePath** | `string` | Specifies a path to a license file.
If both `License` and `LicensePath` are defined, `License` takes precedence.
Default: `license.json` | -| **EulaAccepted** | `bool` | Set to `false` to present a request to accept our terms & conditions | -| **DisableAutoUpdate** | `bool` | Disable automatic license updates (from both the `api.ravendb.net` license server **and** the `License` and `LicensePath` configuration options) | -| **DisableAutoUpdateFromApi** | `bool` | Disable automatic license updates from the `api.ravendb.net` license server.
Note: when disabled, the license **can** still be updated using the `License` and `LicensePath` configuration options | +| **EulaAccepted** | `bool` | Set to `false` to present a request to accept our terms & conditions. | +| **DisableAutoUpdate** | `bool` | Disable automatic license updates (from both the `api.ravendb.net` license server **and** the `License` and `LicensePath` configuration options). | +| **DisableAutoUpdateFromApi** | `bool` | Disable automatic license updates from the `api.ravendb.net` license server.
Note: when disabled, the license **can** still be updated using the `License` and `LicensePath` configuration options. | | **DisableLicenseSupportCheck** | `bool` | Control whether to verify the support status of the current license and display it within Studio.
`true`: disable verification
`false`: enable verification | -| **ThrowOnInvalidOrMissingLicense** | `bool` | Throw an exception if the license is missing or cannot be validated | +| **ThrowOnInvalidOrMissingLicense** | `bool` | Throw an exception if the license is missing or cannot be validated. | + +--- + +### License an embedded server using an Environment variable + +You can pass the same configuration options to the embedded server using environment variables. + +* To pass your license to the server as a string, define or edit the environment variable `RAVEN_License`. + Provide your license as a value for this variable. + **Note**, however, that you must first **reformat** the license JSON that you acquired, and + turn it to a single line, eliminating new-line symbols. + + {CODE-TABS} +{CODE-TAB-BLOCK:json:Original_Format} +{ + "Id": "bad5fe9b-fba4-459c-9220-36b438e06e36", + "Name": "rdb", + "Keys": [ + "WBRG3G1zKd536ELfRbWw7x69J", + "zyFCZ+AcGLI9RgSyRq5r4KS7K", + "E0hMr5uzmbMBuxAI6WLBXZTSN", + "t+vGjgrVzqoycTPhHdQxNCK2v", + "7xOwXKUblAhZmHcDeY3xvF0jn", + "EZoZLdaeF0D8FFddNB8NrMWeQ", + "kwzAKfs1BMlXi9ZJsVZO9ABUE", + "yBSYoSQMqKywtLi8wJzEyMzQV", + "Fjc4OTo7PD0+nwIfIJ8CICCfA", + "iEgnwIjIEMkRAlieVc=" + ] +} +{CODE-TAB-BLOCK/} +{CODE-TAB-BLOCK:json:Reformatted} +{"Id": "bad5fe9b-fba4-459c-9220-36b438e06e36","Name": "rdb","Keys": ["WBRG3G1zKd536ELfRbWw7x69J","zyFCZ+AcGLI9RgSyRq5r4KS7K","E0hMr5uzmbMBuxAI6WLBXZTSN","t+vGjgrVzqoycTPhHdQxNCK2v","7xOwXKUblAhZmHcDeY3xvF0jn","EZoZLdaeF0D8FFddNB8NrMWeQ","kwzAKfs1BMlXi9ZJsVZO9ABUE","yBSYoSQMqKywtLi8wJzEyMzQV","Fjc4OTo7PD0+nwIfIJ8CICCfA","iEgnwIjIEMkRAlieVc="]} +{CODE-TAB-BLOCK/} +{CODE-TABS/} + + {INFO: } + You can reformat the license manually, or use a script to do it. + E.g., find below a Bash script that specifies the name of the file from which the license + will be read, and then uses the `-c` flag to compact the file's contents to a single line. + {CODE-BLOCK:plain} +INPUT_FILE="license.json" +jq -c . "$INPUT_FILE" +{CODE-BLOCK/} + {INFO/} + +* Or, you can keep your license file in a folder accessible to the application that embeds your server, + and provide the path to the license file in the `RAVEN_LicensePath` environment variable. {PANEL/} -{PANEL: .NET FrameworkVersion} +{PANEL: `.NET` FrameworkVersion} -The default FrameworkVersion is defined to work with any .NET version from the time of the RavenDB server release -and newer by using the `+` moderator. For example, `ServerOptions.FrameworkVersion = 3.1.17+`. +The default FrameworkVersion is defined to work with any `.NET` version from the time of the RavenDB server release +and newer by using the `+` moderator. +E.g. `ServerOptions.FrameworkVersion = 3.1.17+` -Thus, by leaving the default FrameworkVersion definition, RavenDB embedded servers will automatically look for the .NET -version that is currently running on the machine, starting from the version at the time of the server release. +Thus, by leaving the default FrameworkVersion definition, RavenDB embedded servers will automatically look for the ` +.NET` version that is currently running on the machine, starting from the version at the time of the server release. -{INFO: Making Sure That You Have the Right .NET Version} +{INFO: Making sure that you have the right `.NET` version} -Remember that each RavenDB release is compiled with the .NET version that was current at the time of release. +Each RavenDB release is compiled with the `.NET` version that was current at the time of the release. -* To find what .NET version supports RavenDB 5.1, for example, open the [RavenDB 5.1 What's New](https://ravendb.net/docs/article-page/5.1/csharp/start/whats-new) page. - The correct .NET version for RavenDB 5.1, .NET 5.0.6., is listed at the bottom of the "Server" section." -* By default, your RavenDB server will look for .NET 5.0.6, 5.0.7, etc. So, as long as you have at least one of these .NET versions running on your machine, - RavenDB will work well. +* To find which `.NET` version supports RavenDB 5.1, for example, open the + [RavenDB 5.1 What's New](https://ravendb.net/docs/article-page/5.1/csharp/start/whats-new) page. + The correct `.NET` version for RavenDB 5.1, `.NET` 5.0.6., is listed at the bottom of the **Server** section. +* By default, your RavenDB server will look for `.NET` 5.0.6, 5.0.7, etc. + So as long as you have at least one of these `.NET` versions running on your machine, RavenDB will work well. {INFO/} -To stay within a major or minor .NET release, but ensure flexibility with patch releases, +To stay within a major or minor `.NET` release, but ensure flexibility with patch releases, use a floating integer `x`. It will always use the newest version found on your machine. -For example, `ServerOptions.FrameworkVersion = 3.x` will look for the newest 3.x release. -`...= 3.2.x` will look for the newest 3.2 release. +E.g., `ServerOptions.FrameworkVersion = 3.x` will look for the newest 3.x release, +`ServerOptions.FrameworkVersion = 3.2.x` will look for the newest 3.2 release. Neither will look for 4.x. | ServerOption Name | Type | Description | | ------------- | ------------- | ----- | -| **FrameworkVersion** | string | The .NET Core framework version to run the server with | +| **FrameworkVersion** | string | The `.NET` Core framework version to run the server with | | Parameter | Description | | --------- | ------------- | -| null | The server will pick the newest .NET version installed on your machine. | -| 3.1.17+ | Default setting (Actual version number is set at the time of server release.) In this example, the server will work properly with .NET patch releases that are greater than or equal to 3.1.17 | -| 3.1.17 | The server will **only** work properly with this exact .NET release | -| 3.1.x | The server will pick the newest .NET patch release on your machine | -| 3.x | The server will pick the newest .NET minor releases and patch releases on your machine | +| `null` | The server will pick the newest `.NET` version installed on your machine. | +| `3.1.17+` | Default setting (Actual version number is set at the time of server release).
In this example, the server will work properly with `.NET` patch releases that are greater than or equal to 3.1.17 | +| `3.1.17` | The server will **only** work properly with this exact `.NET` release. | +| `3.1.x` | The server will pick the newest `.NET` patch release on your machine. | +| `3.x` | The server will pick the newest `.NET` minor releases and patch releases on your machine. | {CODE start_server_with_FrameworkVersion_defined@Server\Embedded.cs /} @@ -258,8 +334,10 @@ Just run `Secured` method in the `ServerOptions` object. {CODE security@Server\Embedded.cs /} -The first way to enable authentication is to set the [certificate with the path to your .pfx](../server/security/authentication/certificate-configuration#standard-manual-setup-with-certificate-stored-locally) -server certificate. You may supply the certificate password using certPassword. +The first way to enable authentication is to set the +[certificate with the path to your .pfx](../server/security/authentication/certificate-configuration#standard-manual-setup-with-certificate-stored-locally) +server certificate. +You can supply the certificate password using certPassword. --- @@ -273,31 +351,32 @@ This option is useful when you want to protect your certificate (private key) wi "Azure Key Vault", "HashiCorp Vault" or even Hardware-Based Protection. RavenDB will invoke a process you specify, so you can write your own scripts / mini-programs and apply the logic that you need. -It creates a clean separation between RavenDB and the secret store in use. +This way a clean separation is kept between RavenDB and the secret store in use. -RavenDB expects to get the raw binary representation (byte array) of the .pfx certificate through the standard output. +RavenDB expects to get the raw binary representation (byte array) of the `.pfx` certificate +through the standard output. {PANEL/} {PANEL: Document Store} -After starting the server you can get the DocumentStore from the Embedded Server and start working with RavenDB. -Getting the DocumentStore from The Embedded Server is pretty easy you only need to call `GetDocumentStore` or `GetDocumentStoreAsync` -with the name of the database you like to work with. +After starting the server you can get the `DocumentStore` from the Embedded Server and start working with RavenDB. +Getting the `DocumentStore` from The Embedded Server is done simply by calling `GetDocumentStore` or `GetDocumentStoreAsync` +with the name of the database you choose to work with. {CODE-TABS} {CODE-TAB:csharp:Sync get_document_store@Server\Embedded.cs /} {CODE-TAB:csharp:Async get_async_document_store@Server\Embedded.cs /} {CODE-TABS/} -For more control on the process you can call the methods with `DatabaseOptions` object. +For additional control over the process you can call the methods with a `DatabaseOptions` object. {INFO:DatabaseOptions} | Name | Type | Description | | ------------- | ------------- | ----- | -| **DatabaseRecord** | DatabaseRecord | Instance of `DatabaseRecord` containing database configuration | -| **SkipCreatingDatabase** | bool | If set to true, will skip try creating the database | +| **DatabaseRecord** | `DatabaseRecord` | Instance of `DatabaseRecord` containing database configuration | +| **SkipCreatingDatabase** | `bool` | If set to true, will skip try creating the database | {INFO /} @@ -312,12 +391,16 @@ For more control on the process you can call the methods with `DatabaseOptions` #### Server URL: -The `GetServerUriAsync` method can be used to retrieve the Embedded server URL. It must be called after server was started, -because it waits for the server initialization to complete. -The URL can be used for example for creating a custom document store, omitting the `GetDocumentStore` method entirely. +The `GetServerUriAsync` method can be used to retrieve the Embedded server URL. +It must be called after the server was started, because it waits for the server's +initialization to complete. +The URL can be used, for example, to create a custom document store, omitting the +`GetDocumentStore` method entirely. {CODE get_server_url_async@Server/Embedded.cs /} +--- + #### Process ID: The `GetServerProcessIdAsync` method can be used to retrieve the system-generated process ID for the diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png new file mode 100644 index 0000000000..dd1d75a0a8 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png new file mode 100644 index 0000000000..fdc731dc45 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png new file mode 100644 index 0000000000..598666840c Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png new file mode 100644 index 0000000000..5d89356e89 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png new file mode 100644 index 0000000000..fdfdafd41e Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png new file mode 100644 index 0000000000..22194ccdf8 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/grace-period.png b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/grace-period.png new file mode 100644 index 0000000000..88a0fc7bd7 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/grace-period.png differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/snag/bank-of-cores_manage-main.snagx b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/snag/bank-of-cores_manage-main.snagx new file mode 100644 index 0000000000..1af4cf1d14 Binary files /dev/null and b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/images/snag/bank-of-cores_manage-main.snagx differ diff --git a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown index b9adb2357f..778ed8dbe3 100644 --- a/Documentation/5.4/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown +++ b/Documentation/5.4/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown @@ -3,14 +3,15 @@ {NOTE: } -* The license key is in JSON format. - It is sent to the email address that was provided when obtaining the license. - -* A few **License Types** are available, learn more about them below. - {INFO: } - Visit the [Pricing page](https://ravendb.net/buy) to see **which features are included with each license type**. - {INFO/} - +* RavenDB is activated using a JSON format license key. + The key is sent to the email address provided while obtaining the license. + +* A few license types are available. + The license type you acquire and activate RavenDB with, determines the database's feature set. + * Learn more below about each license type. + * visit the [pricing page](https://ravendb.net/buy) to see the entire feature set + made available by each type. + * Each license has a specific expiration date. To renew your license see [renew license](../../start/licensing/renew-license). @@ -21,6 +22,7 @@ * [Professional](../../start/licensing/licensing-overview#professional) * [Enterprise](../../start/licensing/licensing-overview#enterprise) * [ISV Licenses](../../start/licensing/licensing-overview#isv-licenses) + * [ISV Bank-of-Cores License](../../start/licensing/licensing-overview#isv-bank-of-cores-license) * [Manage license view](../../start/licensing/licensing-overview#manage-license-view) {NOTE/} @@ -43,9 +45,8 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl * Certificates exceeding 4 months expiration period are Not allowed to be used with this license. Automatic renewal of Let’s Encrypt certificates is disabled. * When you are ready to go into production: - * Be sure to choose a license that has all features with which your client was developed. - * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. - + * Be sure to choose a license that has all features with which your client was developed. + * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. * The developer license can be obtained [here](https://ravendb.net/buy#developer). --- @@ -57,7 +58,23 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl * Servers using a Community license are **required to run the latest major version**. E.g., if RavenDB `7.0` is released and your server runs RavenDB `6.2` with a Community license, you will be required to upgrade RavenDB to version `7.0`. - Running a major version older than the latest with a Community license will **block your server's access to Studio**. + Running RavenDB of an older version than the latest with a Community license will **block your + server's access to Studio**. + {NOTE: Grace Period} + If you run your server with a Community license and a new RavenDB major version is released, + Studio will continue to function for **14 days** before it is blocked. + During this period, a pop-up notification will show when Studio is started: + ![Grace period](images/grace-period.png "Grace period") + You can: + + * **Close the notification and keep on working** + For 14 days, after which Studio will be blocked until the server is upgraded or the license replaced. + * **Replace your license** + Acquire a non community license that allows you to use an older version. + * **Download a new server version** + Upgrade to the latest major version. + + {NOTE/} --- @@ -84,51 +101,107 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl {PANEL/} +{PANEL: ISV Bank-of-Cores License} + +An ISV Bank-of-Cores license allows you to generate RavenDB licenses on your own for a given number of cores. +If you purchase a 128-cores license, for example, you can use it to generate 8 licenses for 8-core machines, +16 licenses for 4-core machines, or any other combination that suits your needs. + +* Available bank-of-cores license types are: Essential, Professional, and Enterprise. +* The same license type, allowing the same feature set, is available for all generated sublicenses. + E.g., if the license type you acquire includes the AI integration feature, this feature will be + enabled by all the sublicenses you create. +* [Contact RavenDB for more details](https://ravendb.net/contact). + +{CONTENT-FRAME: Generating bank-of-cores licenses} + +* When you purchase a bank-of-cores license, you are given a login key. + To generate licenses, enter your key at: [https://licenses.ravendb.net/isv](https://licenses.ravendb.net/isv) + + ![License generation login page](images/bank-of-cores_login-key.png "License generation login page") + +* You will be requested to provide an email address associated with your license key. + Authorizing license generation through your email provides an additional security layer. + You can contact RavenDB's support to associate your key with additional addresses or with + all addresses of a given domain. + + ![License generation login page](images/bank-of-cores_login-email.png "License generation login page") + +* An email message with a sign-in link will be sent to the provided email address. + Use this link to enter the bank of cores management page. + + ![License generation management page](images/bank-of-cores_manage-main.png "License generation management page") + + 1. **Main License** + The details of your bank-of-cores license. + 2. **Features** + The features that are available for the licenses you generate here. + 3. **Generate new sublicense** + Use this section to assign cores to a new sublicense. + ![Generate license](images/bank-of-cores_generate-license.png "Generate license") + * _Cores count_ - The number of cores you want to assign this sublicense. + * _Sublicense tag_ - A tag you want to recognize the sublicense by. + * _Customer name_ - The identity of the sublicense's owner. + * _Expiration date_ - The date in which this sublicense will expire and its cores will be returned to your bank. + **Note**: Leavine this field empty will set the expiration date to that of the main license. + * _Generate_ - Click to generate the new sublicense. + +* Generating a sublicense will create a key that you can copy or download and register RavenDB with. + + ![New sublicense key](images/bank-of-cores_sublicense-key.png "New sublicense key") + +* The new sublicense will then be listed in the sublicenses list at the bottom of the page. + + ![Sublicenses list](images/bank-of-cores_sublicenses-list.png "Sublicenses list") + +{CONTENT-FRAME/} + +{PANEL/} + {PANEL: Manage license view} ![About page](images/about-page.png "About page") -#### 1.   About -* Go to the About page to see the version, license, and support info. - -#### 2.   Version -* **Current version**: - Specifies the current Server and Studio client versions used. - Knowing the version is important as documentation, features, and patches are version sensitive. -* **Send Feedback**: - You can send RavenDB feedback about any issues you've encountered. -* **Latest version info**: - Specifies whether you are using the latest Server version. - If you need to upgrade to a new version see [upgrading instructions](../../start/installation/upgrading-to-new-version). - -#### 3.   License Information -* **Type**: - Specifies which license type you're using. -* **Expires**: - Specifies the date on which the license will expire. -* **Available features**: - The features included with this license are listed. -* **License Server**: - Notifies if there is an active connection to RavenDB's License Server. - If you aren't connected, it is usually either because a firewall is blocking the connection, - or your server is running offline. - * Make sure that RavenDB has access to `api.ravendb.net`. - * Click the refresh button to check the connection. - - ![License server connection](images/license-server.png "License server connection") - -#### 4.   Available actions -* [Replace License](../../start/licensing/replace-license) / [Force Update](../../start/licensing/force-update) / [Renew License](../../start/licensing/renew-license) - -#### 5.   Support plan -* Specifies the support options available under your current support plan. - -#### 6.   Links -* **Access**: - Click to select RavenDB Community Discussions in GitHub, or Google Groups archive. -* **Upgrade**: - Click to go to the RavenDB support options page. - +1. **About** + Click to open the About page and view RavenDB version, license, support info, and more. + +2. **Version** + * **Current version**: + Specifies the current Server and Studio client versions used. + Knowing the version is important as documentation, features, and patches are version sensitive. + * **Send Feedback**: + You can send RavenDB feedback about any issues you've encountered. + * **Latest version info**: + Specifies whether you are using the latest Server version. + If you need to upgrade to a new version see [upgrading instructions](../../start/installation/upgrading-to-new-version). + +3. **License Information** + * **Type**: + Specifies which license type you're using. + * **Expires**: + Specifies the date on which the license will expire. + * **Available features**: + The features included with this license are listed. + * **License Server**: + Notifies if there is an active connection to RavenDB's License Server. + If you aren't connected, it is usually either because a firewall is blocking the connection, + or your server is running offline. + * Make sure that RavenDB has access to `api.ravendb.net`. + * Click the refresh button to check the connection. + + ![License server connection](images/license-server.png "License server connection") + +4. **Available actions** + [Replace License](../../start/licensing/replace-license) / [Force Update](../../start/licensing/force-update) / [Renew License](../../start/licensing/renew-license) + +5. **Support plan** + Specifies the support options available under your current support plan. + +6. **Links** + * **Access**: + Click to select RavenDB Community Discussions in GitHub, or Google Groups archive. + * **Upgrade**: + Click to go to the RavenDB support options page. {PANEL/} diff --git a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj index 3749ca6452..ca9b46a4bc 100644 --- a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj +++ b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Raven.Documentation.Samples.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs index d4c758fa48..8cb95d5616 100644 --- a/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs +++ b/Documentation/5.4/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs @@ -105,8 +105,32 @@ public void EmbeddedSamples() #endregion - #region get_document_store + #region LicensingOptions_License + + EmbeddedServer.Instance.StartServer(new ServerOptions + { + Licensing = new ServerOptions.LicensingOptions + { + License = "your license here" + } + }); + + #endregion + + #region LicensingOptions_LicensePath + EmbeddedServer.Instance.StartServer(new ServerOptions + { + Licensing = new ServerOptions.LicensingOptions + { + LicensePath = "path to license.json file" + } + }); + + #endregion + + #region get_document_store + EmbeddedServer.Instance.GetDocumentStore("Embedded"); #endregion @@ -131,9 +155,11 @@ public void EmbeddedSamples() certPassword: "CertificatePassword"); #endregion + string fileName = "path/to/certificate.pfx"; + string password = "password"; #region security2 var serverOptionsWithExec = new ServerOptions(); - var certificate = new X509Certificate2(); + var certificate = new X509Certificate2(fileName, password); serverOptionsWithExec.Secured( certLoadExec: "powershell", certExecArgs: "C:\\secrets\\give_me_cert.ps1", diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png new file mode 100644 index 0000000000..dd1d75a0a8 Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png new file mode 100644 index 0000000000..fdc731dc45 Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png new file mode 100644 index 0000000000..598666840c Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png new file mode 100644 index 0000000000..5d89356e89 Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png new file mode 100644 index 0000000000..fdfdafd41e Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png new file mode 100644 index 0000000000..22194ccdf8 Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png new file mode 100644 index 0000000000..88a0fc7bd7 Binary files /dev/null and b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png differ diff --git a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown index d2fa95e62a..441c860109 100644 --- a/Documentation/6.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown +++ b/Documentation/6.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown @@ -3,14 +3,15 @@ {NOTE: } -* The license key is in JSON format. - It is sent to the email address that was provided when the license was obtained. - -* A few **License Types** are available, learn more about them below. - {INFO: } - Visit the [Pricing page](https://ravendb.net/buy) to see **which features are included with each license type**. - {INFO/} - +* RavenDB is activated using a JSON format license key. + The key is sent to the email address provided while obtaining the license. + +* A few license types are available. + The license type you acquire and activate RavenDB with, determines the database's feature set. + * Learn more below about each license type. + * visit the [pricing page](https://ravendb.net/buy) to see the entire feature set + made available by each type. + * Each license has a specific expiration date. To renew your license see [renew license](../../start/licensing/renew-license). @@ -21,6 +22,7 @@ * [Professional](../../start/licensing/licensing-overview#professional) * [Enterprise](../../start/licensing/licensing-overview#enterprise) * [ISV Licenses](../../start/licensing/licensing-overview#isv-licenses) + * [ISV Bank-of-Cores License](../../start/licensing/licensing-overview#isv-bank-of-cores-license) * [Manage license view](../../start/licensing/licensing-overview#manage-license-view) {NOTE/} @@ -29,7 +31,9 @@ {PANEL: License types} -The following licences are available. +{INFO: } +Visit the [pricing page](https://ravendb.net/buy) to see which features are included with each license type. +{INFO/} --- @@ -41,9 +45,8 @@ The following licences are available. * Certificates exceeding 4 months expiration period are Not allowed to be used with this license. Automatic renewal of Let’s Encrypt certificates is disabled. * When you are ready to go into production: - * Be sure to choose a license that has all features with which your client was developed. - * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. - + * Be sure to choose a license that has all features with which your client was developed. + * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. * The developer license can be obtained [here](https://ravendb.net/buy#developer). --- @@ -51,7 +54,27 @@ The following licences are available. ### Community * A basic production-grade license. -* Community licenses last for one year and can be renewed every year. +* Community licenses last one year and can be renewed every year. +* Servers using a Community license are **required to run the latest major version**. + E.g., if RavenDB `7.0` is released and your server runs RavenDB `6.2` with a Community license, + you will be required to upgrade RavenDB to version `7.0`. + Running RavenDB of an older version than the latest with a Community license will **block your + server's access to Studio**. + {NOTE: Grace Period} + If you run your server with a Community license and a new RavenDB major version is released, + Studio will continue to function for **14 days** before it is blocked. + During this period, a pop-up notification will show when Studio is started: + ![Grace period](images/grace-period.png "Grace period") + You can: + + * **Close the notification and keep on working** + For 14 days, after which Studio will be blocked until the server is upgraded or the license replaced. + * **Replace your license** + Acquire a non community license that allows you to use an older version. + * **Download a new server version** + Upgrade to the latest major version. + + {NOTE/} --- @@ -78,6 +101,63 @@ The following licences are available. {PANEL/} +{PANEL: ISV Bank-of-Cores License} + +An ISV Bank-of-Cores license allows you to generate RavenDB licenses on your own for a given number of cores. +If you purchase a 128-cores license, for example, you can use it to generate 8 licenses for 8-core machines, +16 licenses for 4-core machines, or any other combination that suits your needs. + +* Available bank-of-cores license types are: Essential, Professional, and Enterprise. +* The same license type, allowing the same feature set, is available for all generated sublicenses. + E.g., if the license type you acquire includes the AI integration feature, this feature will be + enabled by all the sublicenses you create. +* [Contact RavenDB for more details](https://ravendb.net/contact). + +{CONTENT-FRAME: Generating bank-of-cores licenses} + +* When you purchase a bank-of-cores license, you are given a login key. + To generate licenses, enter your key at: [https://licenses.ravendb.net/isv](https://licenses.ravendb.net/isv) + + ![License generation login page](images/bank-of-cores_login-key.png "License generation login page") + +* You will be requested to provide an email address associated with your license key. + Authorizing license generation through your email provides an additional security layer. + You can contact RavenDB's support to associate your key with additional addresses or with + all addresses of a given domain. + + ![License generation login page](images/bank-of-cores_login-email.png "License generation login page") + +* An email message with a sign-in link will be sent to the provided email address. + Use this link to enter the bank of cores management page. + + ![License generation management page](images/bank-of-cores_manage-main.png "License generation management page") + + 1. **Main License** + The details of your bank-of-cores license. + 2. **Features** + The features that are available for the licenses you generate here. + 3. **Generate new sublicense** + Use this section to assign cores to a new sublicense. + ![Generate license](images/bank-of-cores_generate-license.png "Generate license") + * _Cores count_ - The number of cores you want to assign this sublicense. + * _Sublicense tag_ - A tag you want to recognize the sublicense by. + * _Customer name_ - The identity of the sublicense's owner. + * _Expiration date_ - The date in which this sublicense will expire and its cores will be returned to your bank. + **Note**: Leavine this field empty will set the expiration date to that of the main license. + * _Generate_ - Click to generate the new sublicense. + +* Generating a sublicense will create a key that you can copy or download and register RavenDB with. + + ![New sublicense key](images/bank-of-cores_sublicense-key.png "New sublicense key") + +* The new sublicense will then be listed in the sublicenses list at the bottom of the page. + + ![Sublicenses list](images/bank-of-cores_sublicenses-list.png "Sublicenses list") + +{CONTENT-FRAME/} + +{PANEL/} + {PANEL: Manage license view} ![About page](images/about-page.png "About page") diff --git a/Documentation/6.2/Raven.Documentation.Pages/server/Embedded.dotnet.markdown b/Documentation/6.2/Raven.Documentation.Pages/server/Embedded.dotnet.markdown index 7d6706f59f..a51f65a2b2 100644 --- a/Documentation/6.2/Raven.Documentation.Pages/server/Embedded.dotnet.markdown +++ b/Documentation/6.2/Raven.Documentation.Pages/server/Embedded.dotnet.markdown @@ -8,18 +8,20 @@ * In this page: * [Overview](../server/embedded#overview) - * [Prerequisites](../server/embedded#prerequisite) + * [Prerequisites and Recommendations](../server/embedded#prerequisites-and-recommendations) * [Installation](../server/embedded#installation) - * [Starting the Server](../server/embedded#starting-the-server) - * [Server Options](../server/embedded#server-options) - * [Setting Server Directory](../server/embedded#setting-server-directory) - * [Restarting the Server](../server/embedded#restarting-the-server) + * [Starting the server](../server/embedded#starting-the-server) + * [Server options](../server/embedded#server-options) + * [Setting server directory](../server/embedded#setting-server-directory) + * [Restarting the server](../server/embedded#restarting-the-server) * [ServerProcessExited Event](../server/embedded#serverprocessexited-event) - * [Licensing options](../server/embedded#licensing-options) - * [.NET FrameworkVersion](../server/embedded#.net-frameworkversion) + * [Embedded server licensing](../server/embedded#embedded-server-licensing) + * [Licensing configuration options](../server/embedded#licensing-configuration-options) + * [License an embedded server using an Environment variable](../server/embedded#license-an-embedded-server-using-an-environment-variable) + * [`.NET` FrameworkVersion](../server/embedded#.net-frameworkversion) * [Security](../server/embedded#security) - * [Document Store](../server/embedded#document-store) - * [Get Server URL and Process ID](../server/embedded#get-server-url-and-process-id) + * [Document store](../server/embedded#document-store) + * [Get server URL and process ID](../server/embedded#get-server-url-and-process-id) * [Remarks](../server/embedded#remarks) {NOTE/} @@ -28,7 +30,8 @@ {PANEL: Overview} -RavenDB makes it very easy to be embedded within your application, with RavenDB Embedded package you can integrate your RavenDB server with a few easy steps. +RavenDB can be easily embedded in your application. +Use the Embedded package to integrate RavenDB in just a few easy steps. {CODE-TABS} {CODE-TAB:csharp:Sync embedded_example@Server\Embedded.cs /} @@ -37,45 +40,46 @@ RavenDB makes it very easy to be embedded within your application, with RavenDB {PANEL/} -{PANEL: Prerequisite} +{PANEL: Prerequisites and Recommendations} -There is one prerequisite and one recommendation for the Embedded package: +* **Prerequisites** + * Install [`.NET` Core runtime](https://dotnet.microsoft.com/en-us/download), + either manually or [along with a RavenDB full version](embedded#setting-server-directory). + * Verify that the RavenDB server [FrameworkVersion](../server/embedded#net-frameworkversion) + definition matches the `.NET` Core version that you install. -Prerequsite: - -- Install [.NET Core runtime](https://dotnet.microsoft.com/en-us/download) either manually or [along with a RavenDB full version](embedded#setting-server-directory) - - Be sure that the RavenDB server [FrameworkVersion](../server/embedded#net-frameworkversion) definition matches the .NET Core - version that you install. - -Recommendation: - -- **Projects targeting .NET Framework 4.6.1+** that use old `packages.config` for maintaining NuGet packages should be **migrated to - `PackageReference` package management** (please refer to section below on how to achieve this) +* **Recommendations** + * Projects targeting `.NET Framework 4.6.1+` that use the old `packages.config` + for NuGet packages maintenance, should migrate to `PackageReference` package management. + Find additional details [below](../server/embedded#migrating-from--to--in-old-csproj-projects). --- -### .NET Core Runtime: +### `.NET` Core Runtime: -RavenDB Embedded **does not include .NET Core runtime required for it to run**. +RavenDB Embedded **does not include** the `.NET` Core runtime engine required for its operation. -By default, the `ServerOptions.FrameworkVersion` is set to the .NET Core version that we compiled the server with and -`ServerOptions.DotNetPath` is set to `dotnet` meaning that it will require to have it declared in PATH. +By default, `ServerOptions.FrameworkVersion` is set to the `.NET` Core version that we compiled +the server with and `ServerOptions.DotNetPath` is set to `dotnet` - meaning it is required to have +it declared in PATH. -We highly recommend using the .NET Core framework version defined in `ServerOptions.FrameworkVersion` for proper functioning -of the Server. The .NET Core runtime can be downloaded from [here](https://dotnet.microsoft.com/download). +We highly recommend using the `.NET` Core framework version defined in `ServerOptions.FrameworkVersion` +for proper server function. +You can download the `.NET` Core runtime engine [here](https://dotnet.microsoft.com/download). --- ### Migrating from `packages.config` to `PackageReference` in old csproj projects: -Due to the NuGet limitations, we recommend that the Embedded package should be installed via newer package management using -`PackageReference` instead of old `packages.config`. +Due to NuGet limitations, we recommend installing the Embedded package via newer package management, +using `PackageReference` rather than the older `packages.config`. -The transition between those two is easy due to built-in into Visual Studio 2017 migrator written by Microsoft. Please read -following [article](https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference) written by Microsoft that will guide you through the process. +The transition between the two is made easy by the built-in Visual Studio migrator. +Find further guidance in this [Microsoft article](https://docs.microsoft.com/en-us/nuget/reference/migrate-packages-config-to-package-reference). -Please note that **binding redirects** in `App.config` are still required when 'PackageReference' is used in old csproj projects. -Not doing so might result in an assembly load exception e.g. +Please note that _binding redirects_ in `App.config` are still required when 'PackageReference' +is used in old `csproj` projects. Failing to use _binding redirects_ might result in an assembly +load exception such as: ``` Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, @@ -110,8 +114,8 @@ match the assembly reference. (Exception from HRESULT: 0x80131040) {PANEL: Installation} -* Create a new project (.NET Standard 2.0+, .NET Core 2.0+, .NET Framework 4.6.1+). -* Grab the package from our [NuGet](https://www.nuget.org/packages/RavenDB.Embedded) +* Create a new project (.`NET Standard 2.0+`, `.NET Core 2.0+`, `.NET Framework 4.6.1+`). +* Grab our [NuGet package](https://www.nuget.org/packages/RavenDB.Embedded) {CODE-BLOCK:powershell} Install-Package RavenDB.Embedded -Version 4.1.0 {CODE-BLOCK/} @@ -121,18 +125,18 @@ Install-Package RavenDB.Embedded -Version 4.1.0 {PANEL: Starting the Server} RavenDB Embedded Server is available under `EmbeddedServer.Instance`. -In order to start it, call `StartServer` method. +Start the server using the `StartServer` method. {CODE start_server@Server\Embedded.cs /} -For more control on how to start the server, pass to `StartServer` method a `ServerOptions` object. +For more control over the server startup, pass `StartServer` a `ServerOptions` object. {PANEL/} {PANEL: Server Options} -Set `ServerOptions` to change server settings such as .NET FrameworkVersion, DataDirectory, -and additional options: +Set `ServerOptions` to change server settings such as `.NET` FrameworkVersion, DataDirectory, +and additional options. | Name | Type | Description | | ------------- | ------------- | ----- | @@ -151,12 +155,12 @@ If `ServerOptions` is not provided, RavenDB server will start with a default val --- ### Setting Server Directory: -In case you're not interested in installing the .NET run-time environment on your system, you can - +In case you are not interested in installing the `.NET` run-time environment on your system, you can - * [Download](https://ravendb.net/download) a full RavenDB version. - This version already includes a .NET run-time environment. + This version already includes a `.NET` run-time environment. * Extract the downloaded version to a local folder. - E.g. `C:\RavenDB`. + E.g. `C:\RavenDB` * Set the `ServerDirectory` server option to the RavenDB subfolder that contains - * `Raven.Server.exe` in Windows * `Raven.Server` in Posix @@ -166,7 +170,7 @@ In case you're not interested in installing the .NET run-time environment on you --- ### Restarting the Server: -To restart the server, use the method `.RestartServerAsync()`. +To restart the server, use the `.RestartServerAsync()` method. {CODE-BLOCK:csharp} public async Task RestartServerAsync(); @@ -187,61 +191,133 @@ event EventHandler? ServerProcessExited; Event data is of type `ServerProcessExitedEventArgs`. +{PANEL/} + +{PANEL: Embedded server licensing} + +* The **same license types** available for Standalone RavenDB servers, are available for Embedded servers. +* A licensed server can be managed using Studio, and is given a superior feature set to that of + non-registered servers. See the full list of license types and their features [here](https://ravendb.net/buy). +* An embedded server can be licensed using **Configuration options** or an **Environment variable**. + +--- + +### Licensing configuration options + +Embedded server licensing configuration options are gathered in the `ServerOptions.Licensing` class. +After acquiring a license, it can be passed to the server either as a string or as a file. + +* To pass your license to the server as a string, use the `ServerOptions.LicensingOptions.License` + configuration option. + {CODE LicensingOptions_License@Server\Embedded.cs /} +* To keep your license file in your file system and point the server to its path, + use the `ServerOptions.LicensingOptions.LicensePath` configuration option. + {CODE LicensingOptions_LicensePath@Server\Embedded.cs /} + --- -### Licensing options: -A `ServerOptions.Licensing` class gathers configuration options related to the licensing of the embedded server: +#### Available LicensingOptions configuration options: | Name | Type | Description | | ------------- | ------------- | ----- | | **License** | `string` | Specifies the full license string directly in the configuration.
If both `License` and `LicensePath` are defined, `License` takes precedence. | | **LicensePath** | `string` | Specifies a path to a license file.
If both `License` and `LicensePath` are defined, `License` takes precedence.
Default: `license.json` | -| **EulaAccepted** | `bool` | Set to `false` to present a request to accept our terms & conditions | -| **DisableAutoUpdate** | `bool` | Disable automatic license updates (from both the `api.ravendb.net` license server **and** the `License` and `LicensePath` configuration options) | -| **DisableAutoUpdateFromApi** | `bool` | Disable automatic license updates from the `api.ravendb.net` license server.
Note: when disabled, the license **can** still be updated using the `License` and `LicensePath` configuration options | +| **EulaAccepted** | `bool` | Set to `false` to present a request to accept our terms & conditions. | +| **DisableAutoUpdate** | `bool` | Disable automatic license updates (from both the `api.ravendb.net` license server **and** the `License` and `LicensePath` configuration options). | +| **DisableAutoUpdateFromApi** | `bool` | Disable automatic license updates from the `api.ravendb.net` license server.
Note: when disabled, the license **can** still be updated using the `License` and `LicensePath` configuration options. | | **DisableLicenseSupportCheck** | `bool` | Control whether to verify the support status of the current license and display it within Studio.
`true`: disable verification
`false`: enable verification | -| **ThrowOnInvalidOrMissingLicense** | `bool` | Throw an exception if the license is missing or cannot be validated | +| **ThrowOnInvalidOrMissingLicense** | `bool` | Throw an exception if the license is missing or cannot be validated. | + +--- + +### License an embedded server using an Environment variable + +You can pass the same configuration options to the embedded server using environment variables. + +* To pass your license to the server as a string, define or edit the environment variable `RAVEN_License`. + Provide your license as a value for this variable. + **Note**, however, that you must first **reformat** the license JSON that you acquired, and + turn it to a single line, eliminating new-line symbols. + + {CODE-TABS} +{CODE-TAB-BLOCK:json:Original_Format} +{ + "Id": "bad5fe9b-fba4-459c-9220-36b438e06e36", + "Name": "rdb", + "Keys": [ + "WBRG3G1zKd536ELfRbWw7x69J", + "zyFCZ+AcGLI9RgSyRq5r4KS7K", + "E0hMr5uzmbMBuxAI6WLBXZTSN", + "t+vGjgrVzqoycTPhHdQxNCK2v", + "7xOwXKUblAhZmHcDeY3xvF0jn", + "EZoZLdaeF0D8FFddNB8NrMWeQ", + "kwzAKfs1BMlXi9ZJsVZO9ABUE", + "yBSYoSQMqKywtLi8wJzEyMzQV", + "Fjc4OTo7PD0+nwIfIJ8CICCfA", + "iEgnwIjIEMkRAlieVc=" + ] +} +{CODE-TAB-BLOCK/} +{CODE-TAB-BLOCK:json:Reformatted} +{"Id": "bad5fe9b-fba4-459c-9220-36b438e06e36","Name": "rdb","Keys": ["WBRG3G1zKd536ELfRbWw7x69J","zyFCZ+AcGLI9RgSyRq5r4KS7K","E0hMr5uzmbMBuxAI6WLBXZTSN","t+vGjgrVzqoycTPhHdQxNCK2v","7xOwXKUblAhZmHcDeY3xvF0jn","EZoZLdaeF0D8FFddNB8NrMWeQ","kwzAKfs1BMlXi9ZJsVZO9ABUE","yBSYoSQMqKywtLi8wJzEyMzQV","Fjc4OTo7PD0+nwIfIJ8CICCfA","iEgnwIjIEMkRAlieVc="]} +{CODE-TAB-BLOCK/} +{CODE-TABS/} + + {INFO: } + You can reformat the license manually, or use a script to do it. + E.g., find below a Bash script that specifies the name of the file from which the license + will be read, and then uses the `-c` flag to compact the file's contents to a single line. + {CODE-BLOCK:plain} +INPUT_FILE="license.json" +jq -c . "$INPUT_FILE" +{CODE-BLOCK/} + {INFO/} + +* Or, you can keep your license file in a folder accessible to the application that embeds your server, + and provide the path to the license file in the `RAVEN_LicensePath` environment variable. {PANEL/} -{PANEL: .NET FrameworkVersion} +{PANEL: `.NET` FrameworkVersion} -The default FrameworkVersion is defined to work with any .NET version from the time of the RavenDB server release -and newer by using the `+` moderator. For example, `ServerOptions.FrameworkVersion = 3.1.17+`. +The default FrameworkVersion is defined to work with any `.NET` version from the time of the RavenDB server release +and newer by using the `+` moderator. +E.g. `ServerOptions.FrameworkVersion = 3.1.17+` -Thus, by leaving the default FrameworkVersion definition, RavenDB embedded servers will automatically look for the .NET -version that is currently running on the machine, starting from the version at the time of the server release. +Thus, by leaving the default FrameworkVersion definition, RavenDB embedded servers will automatically look for the ` +.NET` version that is currently running on the machine, starting from the version at the time of the server release. -{INFO: Making Sure That You Have the Right .NET Version} +{INFO: Making sure that you have the right `.NET` version} -Remember that each RavenDB release is compiled with the .NET version that was current at the time of release. +Each RavenDB release is compiled with the `.NET` version that was current at the time of the release. -* To find what .NET version supports RavenDB 5.1, for example, open the [RavenDB 5.1 What's New](https://ravendb.net/docs/article-page/5.1/csharp/start/whats-new) page. - The correct .NET version for RavenDB 5.1, .NET 5.0.6., is listed at the bottom of the "Server" section." -* By default, your RavenDB server will look for .NET 5.0.6, 5.0.7, etc. So, as long as you have at least one of these .NET versions running on your machine, - RavenDB will work well. +* To find which `.NET` version supports RavenDB 5.1, for example, open the + [RavenDB 5.1 What's New](https://ravendb.net/docs/article-page/5.1/csharp/start/whats-new) page. + The correct `.NET` version for RavenDB 5.1, `.NET` 5.0.6., is listed at the bottom of the **Server** section. +* By default, your RavenDB server will look for `.NET` 5.0.6, 5.0.7, etc. + So as long as you have at least one of these `.NET` versions running on your machine, RavenDB will work well. {INFO/} -To stay within a major or minor .NET release, but ensure flexibility with patch releases, +To stay within a major or minor `.NET` release, but ensure flexibility with patch releases, use a floating integer `x`. It will always use the newest version found on your machine. -For example, `ServerOptions.FrameworkVersion = 3.x` will look for the newest 3.x release. -`...= 3.2.x` will look for the newest 3.2 release. +E.g., `ServerOptions.FrameworkVersion = 3.x` will look for the newest 3.x release, +`ServerOptions.FrameworkVersion = 3.2.x` will look for the newest 3.2 release. Neither will look for 4.x. | ServerOption Name | Type | Description | | ------------- | ------------- | ----- | -| **FrameworkVersion** | string | The .NET Core framework version to run the server with | +| **FrameworkVersion** | string | The `.NET` Core framework version to run the server with | | Parameter | Description | | --------- | ------------- | -| null | The server will pick the newest .NET version installed on your machine. | -| 3.1.17+ | Default setting (Actual version number is set at the time of server release.) In this example, the server will work properly with .NET patch releases that are greater than or equal to 3.1.17 | -| 3.1.17 | The server will **only** work properly with this exact .NET release | -| 3.1.x | The server will pick the newest .NET patch release on your machine | -| 3.x | The server will pick the newest .NET minor releases and patch releases on your machine | +| `null` | The server will pick the newest `.NET` version installed on your machine. | +| `3.1.17+` | Default setting (Actual version number is set at the time of server release).
In this example, the server will work properly with `.NET` patch releases that are greater than or equal to 3.1.17 | +| `3.1.17` | The server will **only** work properly with this exact `.NET` release. | +| `3.1.x` | The server will pick the newest `.NET` patch release on your machine. | +| `3.x` | The server will pick the newest `.NET` minor releases and patch releases on your machine. | {CODE start_server_with_FrameworkVersion_defined@Server\Embedded.cs /} @@ -258,8 +334,10 @@ Just run `Secured` method in the `ServerOptions` object. {CODE security@Server\Embedded.cs /} -The first way to enable authentication is to set the [certificate with the path to your .pfx](../server/security/authentication/certificate-configuration#standard-manual-setup-with-certificate-stored-locally) -server certificate. You may supply the certificate password using certPassword. +The first way to enable authentication is to set the +[certificate with the path to your .pfx](../server/security/authentication/certificate-configuration#standard-manual-setup-with-certificate-stored-locally) +server certificate. +You can supply the certificate password using certPassword. --- @@ -273,31 +351,32 @@ This option is useful when you want to protect your certificate (private key) wi "Azure Key Vault", "HashiCorp Vault" or even Hardware-Based Protection. RavenDB will invoke a process you specify, so you can write your own scripts / mini-programs and apply the logic that you need. -It creates a clean separation between RavenDB and the secret store in use. +This way a clean separation is kept between RavenDB and the secret store in use. -RavenDB expects to get the raw binary representation (byte array) of the .pfx certificate through the standard output. +RavenDB expects to get the raw binary representation (byte array) of the `.pfx` certificate +through the standard output. {PANEL/} {PANEL: Document Store} -After starting the server you can get the DocumentStore from the Embedded Server and start working with RavenDB. -Getting the DocumentStore from The Embedded Server is pretty easy you only need to call `GetDocumentStore` or `GetDocumentStoreAsync` -with the name of the database you like to work with. +After starting the server you can get the `DocumentStore` from the Embedded Server and start working with RavenDB. +Getting the `DocumentStore` from The Embedded Server is done simply by calling `GetDocumentStore` or `GetDocumentStoreAsync` +with the name of the database you choose to work with. {CODE-TABS} {CODE-TAB:csharp:Sync get_document_store@Server\Embedded.cs /} {CODE-TAB:csharp:Async get_async_document_store@Server\Embedded.cs /} {CODE-TABS/} -For more control on the process you can call the methods with `DatabaseOptions` object. +For additional control over the process you can call the methods with a `DatabaseOptions` object. {INFO:DatabaseOptions} | Name | Type | Description | | ------------- | ------------- | ----- | -| **DatabaseRecord** | DatabaseRecord | Instance of `DatabaseRecord` containing database configuration | -| **SkipCreatingDatabase** | bool | If set to true, will skip try creating the database | +| **DatabaseRecord** | `DatabaseRecord` | Instance of `DatabaseRecord` containing database configuration | +| **SkipCreatingDatabase** | `bool` | If set to true, will skip try creating the database | {INFO /} @@ -312,12 +391,16 @@ For more control on the process you can call the methods with `DatabaseOptions` #### Server URL: -The `GetServerUriAsync` method can be used to retrieve the Embedded server URL. It must be called after server was started, -because it waits for the server initialization to complete. -The URL can be used for example for creating a custom document store, omitting the `GetDocumentStore` method entirely. +The `GetServerUriAsync` method can be used to retrieve the Embedded server URL. +It must be called after the server was started, because it waits for the server's +initialization to complete. +The URL can be used, for example, to create a custom document store, omitting the +`GetDocumentStore` method entirely. {CODE get_server_url_async@Server/Embedded.cs /} +--- + #### Process ID: The `GetServerProcessIdAsync` method can be used to retrieve the system-generated process ID for the diff --git a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs index d4c758fa48..8130afc1d4 100644 --- a/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs +++ b/Documentation/6.2/Samples/csharp/Raven.Documentation.Samples/Server/Embedded.cs @@ -105,8 +105,32 @@ public void EmbeddedSamples() #endregion - #region get_document_store + #region LicensingOptions_License + + EmbeddedServer.Instance.StartServer(new ServerOptions + { + Licensing = new ServerOptions.LicensingOptions + { + License = "your license here" + } + }); + + #endregion + + #region LicensingOptions_LicensePath + EmbeddedServer.Instance.StartServer(new ServerOptions + { + Licensing = new ServerOptions.LicensingOptions + { + LicensePath = "path to license.json file" + } + }); + + #endregion + + #region get_document_store + EmbeddedServer.Instance.GetDocumentStore("Embedded"); #endregion @@ -131,9 +155,11 @@ public void EmbeddedSamples() certPassword: "CertificatePassword"); #endregion + string fileName = "path/to/certificate.pfx"; + string password = "password"; #region security2 var serverOptionsWithExec = new ServerOptions(); - var certificate = new X509Certificate2(); + var certificate = new X509Certificate2(fileName, password); serverOptionsWithExec.Secured( certLoadExec: "powershell", certExecArgs: "C:\\secrets\\give_me_cert.ps1", diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png new file mode 100644 index 0000000000..dd1d75a0a8 Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_generate-license.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png new file mode 100644 index 0000000000..fdc731dc45 Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-email.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png new file mode 100644 index 0000000000..598666840c Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_login-key.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png new file mode 100644 index 0000000000..5d89356e89 Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_manage-main.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png new file mode 100644 index 0000000000..fdfdafd41e Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicense-key.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png new file mode 100644 index 0000000000..22194ccdf8 Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/bank-of-cores_sublicenses-list.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png new file mode 100644 index 0000000000..88a0fc7bd7 Binary files /dev/null and b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/images/grace-period.png differ diff --git a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown index 135a77d10b..1a156f1119 100644 --- a/Documentation/7.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown +++ b/Documentation/7.0/Raven.Documentation.Pages/start/licensing/licensing-overview.markdown @@ -3,14 +3,15 @@ {NOTE: } -* The license key is in JSON format. - It is sent to the email address that was provided when the license was obtained. - -* A few **License Types** are available, learn more about them below. - {INFO: } - Visit the [Pricing page](https://ravendb.net/buy) to see **which features are included with each license type**. - {INFO/} - +* RavenDB is activated using a JSON format license key. + The key is sent to the email address provided while obtaining the license. + +* A few license types are available. + The license type you acquire and activate RavenDB with, determines the database's feature set. + * Learn more below about each license type. + * visit the [pricing page](https://ravendb.net/buy) to see the entire feature set + made available by each type. + * Each license has a specific expiration date. To renew your license see [renew license](../../start/licensing/renew-license). @@ -21,6 +22,7 @@ * [Professional](../../start/licensing/licensing-overview#professional) * [Enterprise](../../start/licensing/licensing-overview#enterprise) * [ISV Licenses](../../start/licensing/licensing-overview#isv-licenses) + * [ISV Bank-of-Cores License](../../start/licensing/licensing-overview#isv-bank-of-cores-license) * [Manage license view](../../start/licensing/licensing-overview#manage-license-view) {NOTE/} @@ -43,9 +45,8 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl * Certificates exceeding 4 months expiration period are Not allowed to be used with this license. Automatic renewal of Let’s Encrypt certificates is disabled. * When you are ready to go into production: - * Be sure to choose a license that has all features with which your client was developed. - * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. - + * Be sure to choose a license that has all features with which your client was developed. + * [Upgrade to a production license](https://ravendb.net/buy) and then [replace](../../start/licensing/replace-license) the developer license. * The developer license can be obtained [here](https://ravendb.net/buy#developer). --- @@ -57,7 +58,23 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl * Servers using a Community license are **required to run the latest major version**. E.g., if RavenDB `7.0` is released and your server runs RavenDB `6.2` with a Community license, you will be required to upgrade RavenDB to version `7.0`. - Running a major version older than the latest with a Community license will **block your server's access to Studio**. + Running RavenDB of an older version than the latest with a Community license will **block your + server's access to Studio**. + {NOTE: Grace Period} + If you run your server with a Community license and a new RavenDB major version is released, + Studio will continue to function for **14 days** before it is blocked. + During this period, a pop-up notification will show when Studio is started: + ![Grace period](images/grace-period.png "Grace period") + You can: + + * **Close the notification and keep on working** + For 14 days, after which Studio will be blocked until the server is upgraded or the license replaced. + * **Replace your license** + Acquire a non community license that allows you to use an older version. + * **Download a new server version** + Upgrade to the latest major version. + + {NOTE/} --- @@ -84,6 +101,63 @@ Visit the [pricing page](https://ravendb.net/buy) to see which features are incl {PANEL/} +{PANEL: ISV Bank-of-Cores License} + +An ISV Bank-of-Cores license allows you to generate RavenDB licenses on your own for a given number of cores. +If you purchase a 128-cores license, for example, you can use it to generate 8 licenses for 8-core machines, +16 licenses for 4-core machines, or any other combination that suits your needs. + +* Available bank-of-cores license types are: Essential, Professional, and Enterprise. +* The same license type, allowing the same feature set, is available for all generated sublicenses. + E.g., if the license type you acquire includes the AI integration feature, this feature will be + enabled by all the sublicenses you create. +* [Contact RavenDB for more details](https://ravendb.net/contact). + +{CONTENT-FRAME: Generating bank-of-cores licenses} + +* When you purchase a bank-of-cores license, you are given a login key. + To generate licenses, enter your key at: [https://licenses.ravendb.net/isv](https://licenses.ravendb.net/isv) + + ![License generation login page](images/bank-of-cores_login-key.png "License generation login page") + +* You will be requested to provide an email address associated with your license key. + Authorizing license generation through your email provides an additional security layer. + You can contact RavenDB's support to associate your key with additional addresses or with + all addresses of a given domain. + + ![License generation login page](images/bank-of-cores_login-email.png "License generation login page") + +* An email message with a sign-in link will be sent to the provided email address. + Use this link to enter the bank of cores management page. + + ![License generation management page](images/bank-of-cores_manage-main.png "License generation management page") + + 1. **Main License** + The details of your bank-of-cores license. + 2. **Features** + The features that are available for the licenses you generate here. + 3. **Generate new sublicense** + Use this section to assign cores to a new sublicense. + ![Generate license](images/bank-of-cores_generate-license.png "Generate license") + * _Cores count_ - The number of cores you want to assign this sublicense. + * _Sublicense tag_ - A tag you want to recognize the sublicense by. + * _Customer name_ - The identity of the sublicense's owner. + * _Expiration date_ - The date in which this sublicense will expire and its cores will be returned to your bank. + **Note**: Leavine this field empty will set the expiration date to that of the main license. + * _Generate_ - Click to generate the new sublicense. + +* Generating a sublicense will create a key that you can copy or download and register RavenDB with. + + ![New sublicense key](images/bank-of-cores_sublicense-key.png "New sublicense key") + +* The new sublicense will then be listed in the sublicenses list at the bottom of the page. + + ![Sublicenses list](images/bank-of-cores_sublicenses-list.png "Sublicenses list") + +{CONTENT-FRAME/} + +{PANEL/} + {PANEL: Manage license view} ![About page](images/about-page.png "About page")