Kubernetes e distribuzione Docker

NCache supporta completamente varie versioni di Kubernetes, incluse Azure Kubernetes Service (AKS), AWS Elastic Kubernetes Server (EKS), Google Kubernetes Engine (GKE), Red Hat OpenShift Kubernetes e altro ancora. NCache supporta completamente anche Docker.

kubernetes
docker
Servizio Azure Kubernetes
Servizio Elastic Kubernetes
Red Hat OpenShift
Motore di Google Kubernetes
 

Schierare NCache in un cluster Kubernetes

Puoi distribuire NCache all'interno di un cluster Kubernetes e accedervi NCache distribuzione sia da applicazioni in esecuzione all'interno di Kubernetes che dall'esterno. Puoi anche gestirli e monitorarli NCache cluster che eseguono Kubernetes dall'esterno di Kubernetes. Il diagramma seguente mostra la distribuzione di NCache in un cluster Kubernetes. Questa immagine è la stessa su Azure Kubernetes Service, Amazon Elastic Kubernetes Service, Google Kubernetes Engine (GKE), Red Hat OpenShift Kubernetes e qualsiasi altro ambiente Kubernetes.

NCache Concetti del cluster Kubernetes

Di seguito sono riportati alcuni concetti da comprendere nella distribuzione di cui sopra NCache in Kubernetes.

  1. NCache Servizio di scoperta: Si tratta di un servizio headless che consente l'accesso alle applicazioni in esecuzione all'interno del cluster Kubernetes NCache pod del server utilizzando il relativo nome DNS. NCache I pod server non hanno un indirizzo IP fisso poiché viene assegnato ogni volta che un pod viene avviato o riavviato. Ecco perché il Discovery Service svolge un ruolo fondamentale nell'aiutare i clienti a parlare NCache Pod del server.
  2. NCache Gateway di gestione/monitoraggio: Per la gestione e il monitoraggio è necessario un servizio gateway NCache che viene eseguito all'interno del cluster Kubernetes dall'esterno. Tutte le operazioni di gestione/monitoraggio vengono instradate attraverso questo gateway NCache pod del server. Il gateway può essere configurato per inviare sempre il traffico a uno specifico NCache server Pod così NCache Management Center può connettersi dall'esterno.
  3. NCache Operatore Kubernetes (arrivo): NCache fornisce un operatore che gestisce l'attivazione e la disattivazione della licenza di tutti i pod all'interno di un file NCache distribuzione. L'operatore ne è a conoscenza NCache distribuzione e attiva un numero specifico di NCache licenze solo server in anticipo in modo che possa utilizzarle come NCache I pod del server vengono avviati o riavviati.

Flavor Kubernetes supportati

  1. Azure Kubernetes Service (AKS): NCache supporta le distribuzioni AKS.
    - Ottieni YAML
    - Video dell'AKS
    - Documenti AKS
  2. Servizio AWS Elastic Kubernetes (EKS): NCache supporta le distribuzioni EKS.
    - Ottieni YAML
    - Video dell'ECS
    - Documenti EKS
  3. Red Hat OpenShift Kubernetes: NCache supporta le distribuzioni OpenShift.
    - Ottieni YAML
    - Video OpenShift
    - Documenti OpenShift
  4. Google Kubernetes Engine (GKE): NCache supporta le distribuzioni GKE.
    - Ottieni YAML
    - Video GKE
    - Documenti GKE

Supporto Docker

NCache supporta completamente Docker nei seguenti modi.

1. Immagini Docker su Docker Hub

  • - NCache Enterprise
    • Edizione .NET
    • tiro del docker alachisoft/ncache:ultimo
    • Sistema operativo: Linux (Debian), Windows Server Core 2019
    • Edizione Java
    • tiro del docker alachisoft/ncache:ultimo-java
    • Sistema operativo: Linux (Ubuntu), Windows Server Core 2019
  • - NCache Professional
    • tiro del docker alachisoft/ncache:ultimo-professionale
    • Sistema operativo: Linux (Debian), Windows Server Core 2019
  • - NCache Open Source
    • tiro del docker alachisoft/ncache:server-opensource-5.0.4

2. File Docker per immagini Docker personalizzate

Nella maggior parte delle situazioni, puoi usare semplicemente l'immagine Docker standard di NCache da Docker Hub. Ma, in alcuni casi, potresti voler creare un'immagine Docker personalizzata che includa il tuo software o altre varianti anche del software del sistema operativo standard.

Un esempio di questo è il sapore di Linux. NCache Docker Image su Docker Hub utilizza Debian Linux ma potresti volere un altro tipo di Linux per il tuo NCache server; NCache funziona bene su più versioni di Linux. Oppure, potresti voler creare un'immagine Docker personalizzata per il tuo server delle applicazioni (NCache Client) che contiene non solo la tua applicazione ma anche NCache software client.

In tutti questi casi, Alachisoft ti fornisce vari Dockerfile che puoi modificare e personalizzare in base alle tue esigenze.

File Docker per NCache
Ecco alcuni esempi di questi Dockerfile che puoi modificare per creare un'immagine Docker personalizzata.

Esempio di Dockerfile
Ecco come si presenta un tipico Dockerfile"NCache Enterprise Server per Windows Server Core" appare.

# Setting base image for NCache.
FROM microsoft/dotnet-framework:4.7.2-runtime

# Setting work directory to copy setups and resources for configuring NCache.
WORKDIR /app

# Make sure that the 2 folders ("resources" and "setup") exist in the same directory as the Dockerfile.
# Make sure that "IPBinding.ps1" script resides in the "resources" folder.
# Make sure that Microsoft Visual C++ 2010 x64 Redistributable setup is placed in the "setup" folder. It can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=14632.
# Make sure that NCache setup resides in the "setup" folder. It can be downloaded from http://www.alachisoft.com/download-ncache.html.
# Copying resources and setups into the work directory of the container.
COPY resources .
COPY setup .

# Exposing ports used by NCache for communication.
# Exposing the port at which NCache service will listen for incoming client connection requests.
EXPOSE 9800
# Exposing the port at which NCache service will listen for incoming management connection requests (NCache Manager, Monitor and Tools).
EXPOSE 8250
# Exposing the port at which Bridge service will listen for incoming connection requests from cache processes.
EXPOSE 9900
# Exposing the port at which Bridge service will listen for incoming Management connection requests (NCache Manager and Tools).
EXPOSE 8260

# Installing Microsoft Visual C++ 2010 x64 Redistributable (Prerequisite of NCache).
RUN vcredist_x64.exe /norestart /q

# Installing NCache setup.
# The parameter "INSTALLMODE" represents the NCache installation mode and has the following values:
# Rename this parameter to "EDITION" if you are building image for NCache version 4.8 or older.
#		Enterprise Server Install mode = "0"
#		Enterprise Remote Client Install mode = "3"
# The parameter "KEY" is the install key and is sent to user through e-mail once they download NCache setup. In case if user does not get a key, contact us at http://www.alachisoft.com/company/contact-us.html.
# The parameter "USERFIRSTNAME" represents the first name of the user.
# The parameter "USERLASTNAME" represents the last name of the user.
# The parameter "COMPANYNAME" represents the company the user works for.
# The parameter "EMAILADDRESS" represents the e-mail address of the user.
# The parameter "INSTALLDIR" represents the installation directory where NCache will be installed.
# the parameter "/qn" specifies that NCache will be installed silently without user interaction and will not prompt the user for anything.
RUN msiexec /i ncache.ent.x64.msi INSTALLMODE="0" KEY="XXXXXXXXXX" USERFIRSTNAME="John" USERLASTNAME="Smith" COMPANYNAME="Alachisoft" EMAILADDRESS="john@alachisoft.com" INSTALLDIR="C:\Program Files\NCache" /qn

# Currently, the IP during NCache installation is stored in the configuration files and it can not be made static at that point.
# However, the IP can be made static once the container is started.
# An IP Binding change task is scheduled to run when the container instance is started. This task replaces the IP with the actual IP assigned to the container.
# Creating one time executing IP Binding task that will change the IP in NCache Configuration files on the first time the container is started.
RUN schtasks /Create /TN IPBinding /SC ONSTART /TR "c:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe C:\app\IPBinding.ps1" /ru SYSTEM

# Entry point for the container, once all the required configurations have been made.
CMD start -Verbose

Cosa fare dopo?

© Copyright Alachisoft 2002 - . Tutti i diritti riservati. NCache è un marchio registrato di Diyatech Corp.