Pesquisar

Artículo
· 19 ago, 2024 Lectura de 1 min

Configurações que devem ser copiadas ao migrar o servidor

Perguntas Frequentes de InterSystems

Se necessita migrar seu servidor por algum motivo, pode reduzir o trabalho de configuração do novo ambiente. Basta copiar a informação de configuração de seu ambiente prévio ao novo.

Você pode migrar as seguintes informações de configuração.

  • iris.cpf
  • Configuração do SQL gateway 
  • Configuração do  web gateway *Nota 1
  • rotinas de usuário, etc... armazenadas na base de dados IRISSYS *Nota 2
  • Configuração de segurança 
  • Configuração de tarefas

Nota 1: Se foi estabelecida uma senha, só será necessário restabelecê-la manualmente.
Nota 2: As configurações preferidas, como ^%ZSTART, rotinas ^ZMIRROR, etc., podem ser migradas fisicamente, mas se deve copiar a informação do registro de Windows.

Copiar informação de registro e migrá-la a outro sistema não é um método recomendado.

Server Migration Guide

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 19 ago, 2024

InterSystems at HackMIT 2024

InterSystems’ team is heading to the HackMIT 2024 hackathon, taking place on September 14-15, 2024!

HackMIT is a weekend-long event where students from around the globe work together to design and build innovative technology projects. Students will focus on four main areas for innovation: healthcare, sustainability, education, and interactive media.

Interested to become a mentor? Send a direct message to us!

 

Comentarios (0)1
Inicie sesión o regístrese para continuar
Resumen
· 19 ago, 2024

InterSystems Developers Publications, Week August 12 - 18, 2024, Digest

Articles
Announcements
Questions
#InterSystems IRIS
#Health Connect
#Ensemble
#InterSystems IRIS for Health
#Caché
August 12 - 18, 2024Week at a GlanceInterSystems Developer Community
Artículo
· 19 ago, 2024 Lectura de 4 min

Accessing Azure Blob Storage

Accessing an Azure cloud storage to upload/download blobs is quite easy using the designated %Net.Cloud.Storage.Client class API methods, or using the EnsLib.CloudStorage.* inbound/outbound adaptors.

Note that you'll need to have the %JavaServer External Language Server up and running to use the cloud storage API or adaptors, since they both use the PEX framework using the Java Server.

Here is a quick summary:

Azure Blob Storage is accessed using a connection string that looks similar to this:

DefaultEndpointsProtocol=https;AccountName=abcdefscleanisr;AccountKey=n3mWskdjgfhklsghdfjaskhgkjdfizqMWJ5X2L4JpqeEJk/FuEnw0rPI6E/rULPn0V5BWgFw+AStRJZlYQ==;EndpointSuffix=core.windows.net

Break it into lines with ";" as the delimiter and save it as a text file:

DefaultEndpointsProtocol=https;
AccountName=abcdefscleanisr;
AccountKey=n3mWskdjgfhklsghdfjaskhgkjdfizqMWJ5X2L4JpqeEJk/FuEnw0rPI6E/rULPn0V5BWgFw+AStRJZlYQ==;
EndpointSuffix=core.windows.net

For this example I will name this file "MyAzureStorage.txt".

Now let's activate the API:

set file="C:\Storage\MyAzureStorage.txt"
set endpoint="abcdefscleanisr.privatelink.blob.core.windows.net"
set tStatus=""

In the CreateClient API method, the second parameter is the cloud provider:

  • 0 - Amazon S3
  • 1 - Azure Blob
  • 2 - Google Cloud Storage
SET myClient = ##CLASS(%Net.Cloud.Storage.Client).CreateClient(,1,file,0,.tStatus,endpoint)

Once the client has been established (tStatus=1), you can run any of the client's methods:

 

In Azure Blob Storage,  a Bucket is a Container.

So for example, to get the list of Azure containers, run the ListBuckets method:

set list=myClient.ListBuckets()

for i=1:1:list.Count() {write list.GetAt(i).name,!}

clean
dirty

Once you have a container name (let's take the "clean" container as an example), you can get the list of blobs in it:
 

set list=myClient.ListBlobs("clean")

for i=1:1:list.Count() {write list.GetAt(i).name,!}

4caa6f29-e9e6-4cde-9112-65ec28d4eded.jpeg
2374233-e9e6-4cde-9112-65ec28d4eded.jpeg
3klfd3lld-e9e6-4cde-9112-65ec28d4eded.jpeg
4caa6f29-e9e6-87ry-9112-65ec28d4eded.jpeg

The CloudStorage outbound adaptor has fewer options - its methods include only the following:

  • UploadBlobFromString(bucketName,blobName,content)
  • UploadBlobFromStream(bucketName,blobName,content)
  • UploadBlobFromFile(bucketName,blobName,filePath)
  • DeleteBlob(bucketName,blobName)

Here are the settings for configuring a business operation using the EnsLib.CloudStorage.OutboundAdapter with Azure Blob Storage. The Storage Region parameter is not relevant for Azure Blob Storage.

All other parameters are relevant the same as when we were using the CreateClient method:

The ContainerName parameter is not part of the adaptor's parameters - it is not needed to create the client (the CreateClient method does not use it).

However, all the other adaptor methods listed above do need to specify to which bucket/container should the blob be loaded, it makes sense to add it as a parameter as part of the settings:

Class Sasa.BO.Storage Extends Ens.BusinessOperation
{ 
Parameter ADAPTER = "EnsLib.CloudStorage.OutboundAdapter"; 
Property Adapter As EnsLib.CloudStorage.OutboundAdapter; 
Parameter INVOCATION = "Queue"; 
/// Bucket name(Amazon) = Container name(Azure)
Property ContainerName As %String(MAXLEN = 1000); 
Parameter SETTINGS = "ContainerName:Cloud Storage"; 
Method CreateFile(pRequest As Cloud.RES.REST, Output pResponse As Cloud.RES.REST) As %Status
{
    #dim tException As %Exception.SystemException
    Set tStatus = $$$OK
    set pResponse=##class(Cloud.RES.REST).%New() 
    Try {
        Set tStatus = ..Adapter.DeleteBlob(..ContainerName, pRequest.FileName)
        Set tStatus = ..Adapter.UploadBlobFromStream(..ContainerName, pRequest.FileName, pRequest.FileData)   
        if $$$ISERR(tStatus) {
            set pResponse.Success = 0
            set pResponse.ErrorMessage = $system.Status.GetErrorText(tStatus)
        }
    } 
    Catch tException {
        Set tStatus = tException.AsStatus()
        set pResponse.Success=0
        set pResponse.ErrorMessage=$system.Status.GetErrorText(tStatus)
    }
    Quit $$$OK
}

Hope that will help you start using the cloud adaptor with Azure.

Keren.

Comentarios (0)0
Inicie sesión o regístrese para continuar