In this scenario, the DATA directory definition in C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\wrapper.conf or C:/Program Files/cloudbees/sda/repository/bin/wrapper-windows-x86-64.exe (depending on where CloudBees CD/RO is installed) has these settings:
-
set.default.INSTALL_DIRECTORY=C:/cloudbees/sda -
set.default.DATA_DIRECTORY=C:/cloudbees/sda
If the Windows server where the current artifact repository is stored is full and you want to move it to a new device with more disk space, map the artifact repository to a new network location.
In this procedure, the set.default.DATA_DIRECTORY value will change to the NEW_DATA_DIRECTORY value. The REPOSITORY_BACKING_STORE value in C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\server.properties will remain the same, relative to the DATA_DIRECTORY, which will be NEW_DATA_DIRECTORY.
In the example, the DATA_DIRECTORY will be changed to d:\ecdata, and the REPOSITORY_BACKING_STORE value will be relative to this directory.
The REPOSITORY_BACKING_STORE value is always relative to the DATA_DIRECTORY and cannot be set to a fully qualified absolute path.
|
-
Publish the artifact under the current directory (
C:\ProgramData\CloudBees\Software Delivery Automation\repository-data\<artifact_name>\<version>):ectool publishArtifactVersion --artifactName <artifact_name> --version <version> --fromDirectory <directory> --compress 0Example: To publish an artifact under the current directory (
C:\ProgramData\CloudBees\Software Delivery Automation\repository-data\jdoe\2001\1.0.0), enter:ectool publishArtifactVersion --artifactName "jdoe:2001" --version "1.0.0" --fromDirectory d:/temp/artest --compress 0The
from Directory(d:/temp/artest) contains the files to be uploaded. -
Stop the repository server one of these ways:
-
Use the Windows service pane.
-
If you have
adminuser permissions, enter net stop CommanderRepository.
-
-
Move the artifact repository data from the current
/DATA_DIRECTORYdirectory to the/NEW_DATA_DIRECTORYdirectory using one of these methods:-
Use Windows Explorer.
-
Enter move *
<destinationDirectory>where the<destinationDirectory>is the/NEW_DATA_DIRECTORYdirectory.Example: To move the data to
D:\ECDATA, enter move * d:\ecdata.
-
-
In
C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\wrapper.conf, changeset.default.DATA_DIRECTORY=C:/ProgramData/cloudbees/sdatoset.default.DATA_DIRECTORY=/NEW_DATA_DIRECTORY.Example: Change
set.default.DATA_DIRECTORY=C:/ProgramData/cloudbees/sdatoset.default.DATA_DIRECTORY=D:/ECDATA. -
Create a
logs/repository/subdirectory under theNEW_DATA_DIRECTORYusing one of these methods:-
Use Windows Explorer.
-
Enter the
mkdircommand as in the following example:Example: Create
D:\ECDATA\logs\repositoryusing the following commands.mkdir D:\ECDATA\logsmkdir D:\ECDATA\logs\repository
-
-
Copy
C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\server.propertiesandC:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\keystoreto theNEW_DATA_DIRECTORY/conf/repositorydirectory using one of these methods:-
Use Windows Explorer.
-
Enter the
mkdircommand as in the following example:Copy the directories to the
/ECDATA/conf/repositoryusing the following commands:mkdir /ECDATA/confmkdir /ECDATA/conf/repositorycopy C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\ server.properties D:\ECDATA\conf\repository\copy C:\ProgramData\CloudBees\Software Delivery Automation\conf\repository\ keystore D:\ECDATA\conf\repository\
-
-
Start the repository server using Windows Service pane.
-
Check if CloudBees CD/RO has started using the artifact repository in the new network location:
netstat -aon | find “8200”Example:
C:\windows\system32> netstat -aon | find "8200"TCP 0.0.0.0:8200 0.0.0.0:0 LISTENING 22868This shows that the
DATA_DIRECTORYrepository has moved toD:\ECDATA.The repository
service.log,repository.logandrepository.pidfiles will be created in theD:\ECDATA \logs\repositorydirectory. -
Publish a new artifact and check if it is published:
ectool getArtifactVersions | grep artifactVersionName