ePages 6.17.52 - DE_EPAGES/FlexProvider/API/Flex.pm

Package DE_EPAGES::FlexProvider::API::Flex

Provides functions to configure a virtual machine using a configuration server

@EXPORT_OK
GetVirtualMachineInfo
ConfigureVirtualMachine
CreateVirtualMachineShop
UpdateVirtualMachine
SetShopType
GetPatchLog
RunPatchOnStore
RunHotfixesOnStore
RestartConfigServer
GetCSAccount

Functions

ConfigureVirtualMachine
CreateVirtualMachineShop
GetCSAccount
GetPatchLog
GetVirtualMachineInfo
RestartConfigServer
RunHotfixesOnStore
RunPatchOnStore
SetShopType
UpdateVirtualMachine

ConfigureVirtualMachine

Establish a connection to the specified virtual machine and configure the epages installation on the vm The vm is also registered on the site database server

Syntax
$OK = ConfigureVirtualMachine($Provider, $HWParams,$hCTParams);
$OK = ConfigureVirtualMachine($Provider,
{
    VMIpAddress => '172.20.8.1',
},
{
    VMEpagesWebServicePassword => 'qwert6'
    VMEpagesStoreDomainName=> 'mystore.co.uk',
    VMType => 'MerchantPro',
});
Input
$Provider (object)
provider object
$hHWParams (ref.hash)
VM Hardware parameters
  • VMIpAddress - VM ip adress - string
$hCTParams (ref.hash)
Container parameters
  • VMEpagesWebServicePassword (opt.) - the WebService password for the Store - string
  • VMType (opt.) - Type for new Container - string
  • VMEpagesStoreDomainName (opt.) - DomainName for the Store, default: hostname - string
Return
$return (int)
1|error

CreateVirtualMachineShop

Establish webservice connection to the specified virtual machine If epages is running on the virtual machine, the cartidges are syncronized with the site database and a shop with the given params was created

Syntax
$result = CreateVirtualMachineShop($hHWParams,$hShopParams);
CreateVirtualMachineShop({
    VMIpAddress => '172.20.8.1',
},
{
    ShopType => 'Demo',
    Alias => 'TestShop_172.20.8.1',
    ShopAlias => 'TestShop',
    DomainName => 'mystorefrontdomain.co.uk',
    IsTrialShop => 1,
});
Input
$hHWParams (ref.hash)
virtual machine parameters
  • VMIpAddress - VM ip adress - string
$hShopParams (ref.hash)
Shop parameters
  • ShopType (opt.) - shoptype alias - string
  • Alias (opt.) - uniques shop alias for the provider - string
  • ShopAlias - shop alias in store database - string
  • DomainName (opt.) - vainty domain name ot the shop - string
  • HasSSLCertificate (opt.) - the domain specified by -domainname is SSL-enabled - boolean
  • WebServerScriptNamePart (opt.) - web server script name part, default: ShopAlias - string
  • IsTrialShop (opt.) - the shop is in trial period - boolean
  • IsInternalTestShop (opt.) - the shop is used for test or support purposes - boolean
  • IsClosed (opt.) - created shop is closed - boolean
  • ImportFiles (opt.) - files to import - string
  • PublicFilesDir (opt.) - directory with public files, e.g. images - string
  • MerchantLogin (opt.) - merchant login - string
  • MerchantPassword (opt.) - merchant password - string
  • MerchantEMail (opt.) - merchant email address - string
Return
$return (int)
1|error

GetCSAccount

Get account information from $Store

Syntax
($StoreAlias, $IPAddress, $Port, $Passwd) = GetCSAccount($Store)
Input
$Store (object)
Store object (references the remote database)
Return
$StoreAlias (string)
$Store->get('Alias')
$IPAddress (string)
IP adddress derived from $Store->get('WebServiceProxy')
$Port (string)
port as in Container.conf->LoginParams->DefaultConfigServerPort
$Passwd (string)
$Store->get('ConfigurationServerPassword')

GetPatchLog

Fetch content of patch logfile from store.

Syntax
my $PatchLog = GetPatchLog($StoreAlias, $IPAddress, $Port, $Passwd, $Version, $LogType);
Input
$StoreAlias (string)
$Store->get('Alias')
$IPAddress (string)
IP adddress derived from $Store->get('WebServiceProxy')
$Port (string)
port, see Container.conf->LoginParams->DefaultConfigServerPort
$Passwd (string)
$Store->get('ConfigurationServerPassword')
$Version (string)
patch version
$LogType (string)
use specific log file *-$LogType.log, e.g. patch, hotfix, restart (optional)
Return
$PatchLog (string)
contents of patch logfile

GetVirtualMachineInfo

Fetch informations about the virtual machine using the epages configuration server Collect informations about epages running in a VM

Syntax
$result = GetContainerInfo($hHWParams);
GetVirtualMachineInfo({
    VMIpAddress => 172.20.8.1
});
Input
$hHWParams (ref.hash)
vm parameters
  • VMIpAddress - VM ip adress - string
Return
$hEpagesInfo (ref.hash)
epages info parameters
  • ResponseCode - response code from configuration server 0 | 1 if error - int
  • Dedicated - DEDICATED entry from Webinterface.conf - string
  • SytemDomainName - domain name of the system - string
  • maxmemory - MAXMEMORY entry from WebInterface.conf - int
  • appservercount - Count of configured application servers - int
  • ApserverCountRunning - Count of running application servers - int
  • AppserverString - APPLICATIONSERVER entry of Webinterface.conf - string
  • ipaddress - IP section of Webinterface.conf - string
  • InstalledEpagesVersion - installed ePages version - string

RestartConfigServer

Runs '/etc/init.d/ePagesConfigServer restart' on store $StoreAlias.

Syntax
$Status = RestartConfigServer($Store, $Version);
Input
$Store (object)
Store object (references the remote database)
$Version (string)
patch version
Return
$Status (integer)
0 - success ; else - failue

RunHotfixesOnStore

Executes commands in directory DE_EPAGES/Flex/bin/runPatch.d .

Syntax
$Status = RunHotfixesOnStore($Store, $Version, $Execute);
Input
$Store (object)
Store object (references the remote database)
$Version (string)
patch version
$Execute (string)
argument for /etc/cron.daily/epages-hotfix (-check or -console)
Return
$Status (integer)
0 - success ; else - failue

RunPatchOnStore

Executes commands in directory DE_EPAGES/Flex/bin/runPatch.d .

Syntax
$Status = RunPatchOnStore($Store, $Version);
Input
$Store (object)
Store object (references the remote database)
$Version (string)
patch version
Return
$Status (integer)
0 - success ; else - failue

SetShopType

Update the shop type of a running epages

Syntax
$result = SetShopType($hHWParams,$ShopType);
SetShopType({
    VMIpAddress => 172.20.8.1
}, 'Flex_6_13_2');
Input
$hHWParams (ref.hash)
vm parameters
  • VMIpAddress - VM ip adress - string
$ShopType (string)
the shop type to apply on the virtual machine
Return
$return (int)
1 or error

UpdateVirtualMachine

Update an running epages in a virtual machine to the specified VMType

Syntax
$result = UpdateVirtualMachine($hHWParams,$VMType);
UpdateVirtualMachine({
    VMIpAddress => 172.20.8.1
}, 'MerchantProPlus');
Input
$hHWParams (ref.hash)
vm parameters
  • VMIpAddress - VM ip adress - string
$VMType (string)
the vm type to apply on the virtual machine
Return
$return (int)
1 or error

Package DE_EPAGES::FlexProvider::API::ShopConfigService

Functions

provider

provider

Return the provider object added in the $service->new function.

Syntax
$provider = $service->provider;
Return
$Provider (Provider object)
the provider