Implantação de Kubernetes e Docker

NCache oferece suporte total a vários sabores de Kubernetes, incluindo Azure Kubernetes Service (AKS), AWS Elastic Kubernetes Server (EKS), Google Kubernetes Engine (GKE), Red Hat OpenShift Kubernetes e muito mais. NCache também oferece suporte total ao Docker.

Kubernetes
Estivador
Serviço Azure Kubernetes
Serviço Elastic Kubernetes
Red Hat OpenShift
Mecanismo do Google Kubernetes
 

Implantação NCache em um cluster Kubernetes

Você pode implantar NCache dentro de um cluster Kubernetes e acesse este NCache implantação de aplicativos executados dentro do Kubernetes e também de fora. Você também pode gerenciar e monitorar esses NCache clusters executando o Kubernetes de fora do Kubernetes. O diagrama a seguir mostra a implantação do NCache em um cluster Kubernetes. Esta imagem é a mesma no Azure Kubernetes Service, Amazon Elastic Kubernetes Service, Google Kubernetes Engine (GKE), Red Hat OpenShift Kubernetes e qualquer outro ambiente Kubernetes.

NCache Conceitos de cluster Kubernetes

Abaixo estão alguns dos conceitos a serem entendidos na implantação acima de NCache em Kubernetes.

  1. NCache Serviço de descoberta: Este é um serviço headless que permite que aplicativos em execução dentro do cluster Kubernetes acessem NCache pods do servidor usando seu nome DNS. NCache Os pods de servidor não têm um endereço IP fixo, pois ele é atribuído sempre que um pod é iniciado ou reiniciado. É por isso que o Discovery Service desempenha um papel fundamental em ajudar os clientes a falar com NCache pods do servidor.
  2. NCache Gateway de gerenciamento/monitoramento: Um serviço de gateway é necessário para gerenciar e monitorar NCache que está sendo executado dentro do cluster Kubernetes de fora. Todas as operações de gerenciamento/monitoramento são roteadas através deste gateway para NCache pods de servidor. O gateway pode ser configurado para sempre enviar o tráfego para um determinado NCache servidor Pod então NCache O Management Center pode se conectar a ele de fora.
  3. NCache Operador Kubernetes (vinda): NCache fornece um operador que lida com a ativação e desativação de licença de todos os pods dentro de um NCache Implantação. O operador está ciente NCache implantação e ativa um número específico de NCache licenças somente de servidor com antecedência para que possa utilizá-las como NCache os pods do servidor são iniciados ou reiniciados.

Sabores do Kubernetes suportados

  1. Azure Kubernetes Service (AKS): NCache suporta implantações AKS.
    - Obter YAML
    - Vídeo AKS
    - Documentos AKS
  2. Serviço AWS Elastic Kubernetes (EKS): NCache suporta implantações EKS.
    - Obter YAML
    - Vídeo EKS
    - Documentos EKS
  3. Red Hat OpenShift Kubernetes: NCache oferece suporte a implantações OpenShift.
    - Obter YAML
    - Vídeo OpenShift
    - Documentos do OpenShift
  4. Google Kubernetes Engine (GKE): NCache oferece suporte a implantações do GKE.
    - Obter YAML
    - Vídeo do GKE
    - Documentos do GKE

Suporte do Docker

NCache oferece suporte total ao Docker das seguintes maneiras.

1. Imagens Docker no Docker Hub

  • - NCache Enterprise
    • Edição .NET
    • puxão de encaixe alachisoft/ncache:Mais recentes
    • SO: Linux (Debian), Windows Server Core 2019
    • Edição Java
    • puxão de encaixe alachisoft/ncache:mais recente-java
    • SO: Linux (Ubuntu), Windows Server Core 2019
  • - NCache Professional
    • puxão de encaixe alachisoft/ncache:profissional mais recente
    • SO: Linux (Debian), Windows Server Core 2019
  • - NCache Open Source
    • puxão de encaixe alachisoft/ncache:servidor de código aberto-5.0.4

2. Arquivo Docker para imagens Docker personalizadas

Na maioria das situações, você está bem apenas usando a imagem padrão do Docker de NCache do Docker Hub. Mas, em alguns casos, você pode querer criar uma imagem do Docker personalizada que inclua seu próprio software ou outras variações até mesmo do software padrão do sistema operacional.

Um exemplo disso é o sabor do Linux. NCache A imagem do Docker no Docker Hub usa o Debian Linux, mas você pode querer outro sabor do Linux para o seu NCache servidores; NCache funciona bem em vários tipos de Linux. Ou você pode criar uma imagem personalizada do Docker para seu servidor de aplicativos (NCache Client) que contém não apenas seu próprio aplicativo, mas também NCache software cliente.

Em todos esses casos, Alachisoft fornece vários Dockerfiles que você pode editar e personalizar para atender às suas necessidades.

Dockerfiles para NCache
Aqui estão alguns exemplos desses Dockerfiles que você pode editar para criar uma imagem personalizada do Docker.

Exemplo de arquivos Docker
Aqui está como um Dockerfile típico "NCache Enterprise Server para Windows Server Core" se parece.

# 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

O que fazer a seguir?

© Copyright Alachisoft 2002 - . Todos os direitos reservados. NCache é uma marca registrada da Diyatech Corp.