Remove the oss string from OpenSearch distributions (#575)
This commit removes the 'oss' string which was a remnant of the predecessor distribution flavors. As OpenSearch has no flavors for distributions, we are removing this tag from all the distribution names. Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
parent
5474e8d094
commit
163a51fc5a
|
@ -29,9 +29,9 @@ To create a platform-specific build, use the
|
|||
following depending on your operating system:
|
||||
|
||||
-----------------------------
|
||||
./gradlew :distribution:archives:oss-linux-tar:assemble
|
||||
./gradlew :distribution:archives:oss-darwin-tar:assemble
|
||||
./gradlew :distribution:archives:oss-windows-zip:assemble
|
||||
./gradlew :distribution:archives:linux-tar:assemble
|
||||
./gradlew :distribution:archives:darwin-tar:assemble
|
||||
./gradlew :distribution:archives:windows-zip:assemble
|
||||
-----------------------------
|
||||
|
||||
=== Running OpenSearch from a checkout
|
||||
|
@ -72,7 +72,7 @@ In order to start with a different distribution use the `-Drun.distribution` arg
|
|||
To for example start the open source distribution:
|
||||
|
||||
-------------------------------------
|
||||
./gradlew run -Drun.distribution=oss
|
||||
./gradlew run
|
||||
-------------------------------------
|
||||
|
||||
==== Other useful arguments
|
||||
|
@ -489,8 +489,7 @@ that'd consume a ton of ram.
|
|||
=== Iterating on packaging tests
|
||||
|
||||
Because our packaging tests are capable of testing many combinations of OS
|
||||
(e.g., Windows, Linux, etc.), package type (e.g., zip file, RPM, etc.),
|
||||
OpenSearch distribution type (e.g. OSS), and so forth, it's
|
||||
(e.g., Windows, Linux, etc.), package type (e.g., zip file, RPM, etc.) and so forth, it's
|
||||
faster to develop against smaller subsets of the tests. For example, to run
|
||||
tests for the default archive distribution on Fedora 28:
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ allprojects {
|
|||
}
|
||||
|
||||
File licenseHeaderFile
|
||||
licenseHeaderFile = new File(project.rootDir, 'buildSrc/src/main/resources/license-headers/oss-license-header.txt')
|
||||
licenseHeaderFile = new File(project.rootDir, 'buildSrc/src/main/resources/license-headers/license-header.txt')
|
||||
|
||||
String lineSeparator = Os.isFamily(Os.FAMILY_WINDOWS) ? '\\\\r\\\\n' : '\\\\n'
|
||||
String licenseHeader = licenseHeaderFile.getText('UTF-8').replace(System.lineSeparator(), lineSeparator)
|
||||
|
|
|
@ -182,10 +182,10 @@ if (project != rootProject) {
|
|||
|
||||
dependencies {
|
||||
reaper project('reaper')
|
||||
distribution project(':distribution:archives:oss-windows-zip')
|
||||
distribution project(':distribution:archives:oss-darwin-tar')
|
||||
distribution project(':distribution:archives:oss-linux-tar')
|
||||
distribution project(':distribution:archives:oss-linux-aarch64-tar')
|
||||
distribution project(':distribution:archives:windows-zip')
|
||||
distribution project(':distribution:archives:darwin-tar')
|
||||
distribution project(':distribution:archives:linux-tar')
|
||||
distribution project(':distribution:archives:linux-aarch64-tar')
|
||||
|
||||
integTestRuntimeOnly(project(":libs:opensearch-core"))
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ class DistributionDownloadPluginFuncTest extends AbstractGradleFuncTest {
|
|||
|
||||
then:
|
||||
result.tasks.size() == 3
|
||||
result.output.count("Unpacking opensearch-oss-${version}-linux-x86_64.tar.gz " +
|
||||
result.output.count("Unpacking opensearch-${version}-linux-x86_64.tar.gz " +
|
||||
"using SymbolicLinkPreservingUntarTransform.") == 1
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class DistributionDownloadFixture {
|
|||
private static String urlPath(String version, OpenSearchDistribution.Platform platform) {
|
||||
String fileType = ((platform == OpenSearchDistribution.Platform.LINUX ||
|
||||
platform == OpenSearchDistribution.Platform.DARWIN)) ? "tar.gz" : "zip"
|
||||
"/downloads/opensearch/opensearch-oss-${version}-${platform}-x86_64.$fileType"
|
||||
"/downloads/opensearch/opensearch-${version}-${platform}-x86_64.$fileType"
|
||||
}
|
||||
|
||||
private static byte[] filebytes(String urlPath) throws IOException {
|
||||
|
|
|
@ -70,7 +70,7 @@ class InternalDistributionArchiveSetupPluginFuncTest extends AbstractGradleFuncT
|
|||
|
||||
where:
|
||||
buildTaskName | expectedOutputArchivePath
|
||||
"buildOssDarwinTar" | "oss-darwin-tar/build/distributions/opensearch-oss.tar.gz"
|
||||
"buildDarwinTar" | "darwin-tar/build/distributions/opensearch.tar.gz"
|
||||
}
|
||||
|
||||
def "applies defaults to zip tasks"() {
|
||||
|
@ -91,7 +91,7 @@ class InternalDistributionArchiveSetupPluginFuncTest extends AbstractGradleFuncT
|
|||
|
||||
where:
|
||||
buildTaskName | expectedOutputArchivePath
|
||||
"buildOssDarwinZip" | "oss-darwin-zip/build/distributions/opensearch-oss.zip"
|
||||
"buildDarwinZip" | "darwin-zip/build/distributions/opensearch.zip"
|
||||
}
|
||||
|
||||
def "registered distribution provides archives and directory variant"() {
|
||||
|
@ -148,8 +148,8 @@ class InternalDistributionArchiveSetupPluginFuncTest extends AbstractGradleFuncT
|
|||
then: "tar task executed and target folder contains plain tar"
|
||||
result.task(':buildProducerTar').outcome == TaskOutcome.SUCCESS
|
||||
result.task(':consumer:copyArchive').outcome == TaskOutcome.SUCCESS
|
||||
file("producer-tar/build/distributions/opensearch-oss.tar.gz").exists()
|
||||
file("consumer/build/archives/opensearch-oss.tar.gz").exists()
|
||||
file("producer-tar/build/distributions/opensearch.tar.gz").exists()
|
||||
file("consumer/build/archives/opensearch.tar.gz").exists()
|
||||
|
||||
when:
|
||||
result = gradleRunner("copyDir", "-Pversion=1.0").build()
|
||||
|
|
|
@ -56,15 +56,15 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
|
|||
def "builds distribution from branches via archives assemble"() {
|
||||
when:
|
||||
def result = gradleRunner(new File(testProjectDir.root, "remote"),
|
||||
":distribution:bwc:bugfix:buildBwcOssDarwinTar",
|
||||
":distribution:bwc:bugfix:buildBwcDarwinTar",
|
||||
"-DtestRemoteRepo=" + remoteGitRepo,
|
||||
"-Dbwc.remote=origin")
|
||||
.build()
|
||||
then:
|
||||
result.task(":distribution:bwc:bugfix:buildBwcOssDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:bwc:bugfix:buildBwcDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
|
||||
and: "assemble task triggered"
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:oss-darwin-tar:assemble")
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:darwin-tar:assemble")
|
||||
}
|
||||
|
||||
def "bwc distribution archives can be resolved as bwc project artifact"() {
|
||||
|
@ -76,7 +76,7 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
|
|||
}
|
||||
|
||||
dependencies {
|
||||
dists project(path: ":distribution:bwc:bugfix", configuration:"oss-darwin-tar")
|
||||
dists project(path: ":distribution:bwc:bugfix", configuration:"darwin-tar")
|
||||
}
|
||||
|
||||
tasks.register("resolveDistributionArchive") {
|
||||
|
@ -96,13 +96,13 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
|
|||
.build()
|
||||
then:
|
||||
result.task(":resolveDistributionArchive").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:bwc:bugfix:buildBwcOssDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:bwc:bugfix:buildBwcDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
|
||||
and: "assemble task triggered"
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:oss-darwin-tar:assemble")
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:darwin-tar:assemble")
|
||||
normalizedOutput(result.output)
|
||||
.contains("distfile /distribution/bwc/bugfix/build/bwc/checkout-8.0/distribution/archives/oss-darwin-tar/" +
|
||||
"build/distributions/opensearch-oss-8.0.1-SNAPSHOT-darwin-x86_64.tar.gz")
|
||||
.contains("distfile /distribution/bwc/bugfix/build/bwc/checkout-8.0/distribution/archives/darwin-tar/" +
|
||||
"build/distributions/opensearch-8.0.1-SNAPSHOT-darwin-x86_64.tar.gz")
|
||||
}
|
||||
|
||||
def "bwc expanded distribution folder can be resolved as bwc project artifact"() {
|
||||
|
@ -114,7 +114,7 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
|
|||
}
|
||||
|
||||
dependencies {
|
||||
expandedDist project(path: ":distribution:bwc:bugfix", configuration:"expanded-oss-darwin-tar")
|
||||
expandedDist project(path: ":distribution:bwc:bugfix", configuration:"expanded-darwin-tar")
|
||||
}
|
||||
|
||||
tasks.register("resolveExpandedDistribution") {
|
||||
|
@ -134,13 +134,13 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
|
|||
.build()
|
||||
then:
|
||||
result.task(":resolveExpandedDistribution").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:bwc:bugfix:buildBwcOssDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:bwc:bugfix:buildBwcDarwinTar").outcome == TaskOutcome.SUCCESS
|
||||
|
||||
and: "assemble task triggered"
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:oss-darwin-tar:assemble")
|
||||
result.output.contains("[8.0.1] > Task :distribution:archives:darwin-tar:assemble")
|
||||
normalizedOutput(result.output)
|
||||
.contains("distfile /distribution/bwc/bugfix/build/bwc/checkout-8.0/" +
|
||||
"distribution/archives/oss-darwin-tar/build/install")
|
||||
"distribution/archives/darwin-tar/build/install")
|
||||
}
|
||||
|
||||
File setupGitRemote() {
|
||||
|
|
|
@ -82,7 +82,7 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
|
|||
def result = gradleRunner("setupDistro", '-g', testProjectDir.newFolder('GUH').path).build()
|
||||
|
||||
then:
|
||||
result.task(":distribution:archives:oss-linux-tar:buildExpanded").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":distribution:archives:linux-tar:buildExpanded").outcome == TaskOutcome.SUCCESS
|
||||
result.task(":setupDistro").outcome == TaskOutcome.SUCCESS
|
||||
assertExtractedDistroIsCreated("build/distro", 'current-marker.txt')
|
||||
}
|
||||
|
@ -154,24 +154,24 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
|
|||
apply plugin:'base'
|
||||
|
||||
// packed distro
|
||||
configurations.create("oss-linux-tar")
|
||||
configurations.create("linux-tar")
|
||||
tasks.register("buildBwcTask", Tar) {
|
||||
from('bwc-marker.txt')
|
||||
archiveExtension = "tar.gz"
|
||||
compression = Compression.GZIP
|
||||
}
|
||||
artifacts {
|
||||
it.add("oss-linux-tar", buildBwcTask)
|
||||
it.add("linux-tar", buildBwcTask)
|
||||
}
|
||||
|
||||
// expanded distro
|
||||
configurations.create("expanded-oss-linux-tar")
|
||||
configurations.create("expanded-linux-tar")
|
||||
def expandedTask = tasks.register("buildBwcExpandedTask", Copy) {
|
||||
from('bwc-marker.txt')
|
||||
into('build/install/opensearch-distro')
|
||||
}
|
||||
artifacts {
|
||||
it.add("expanded-oss-linux-tar", file('build/install')) {
|
||||
it.add("expanded-linux-tar", file('build/install')) {
|
||||
builtBy expandedTask
|
||||
type = 'directory'
|
||||
}
|
||||
|
@ -181,9 +181,9 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
|
|||
|
||||
private void localDistroSetup() {
|
||||
settingsFile << """
|
||||
include ":distribution:archives:oss-linux-tar"
|
||||
include ":distribution:archives:linux-tar"
|
||||
"""
|
||||
def bwcSubProjectFolder = testProjectDir.newFolder("distribution", "archives", "oss-linux-tar")
|
||||
def bwcSubProjectFolder = testProjectDir.newFolder("distribution", "archives", "linux-tar")
|
||||
new File(bwcSubProjectFolder, 'current-marker.txt') << "current"
|
||||
new File(bwcSubProjectFolder, 'build.gradle') << """
|
||||
import org.gradle.api.internal.artifacts.ArtifactAttributes;
|
||||
|
|
|
@ -34,7 +34,7 @@ subprojects {
|
|||
tasks.register('tar', Tar) {
|
||||
from('.')
|
||||
destinationDirectory.set(file('build/distributions'))
|
||||
archiveBaseName.set("opensearch-oss")
|
||||
archiveBaseName.set("opensearch")
|
||||
archiveVersion.set("8.0.1-SNAPSHOT")
|
||||
archiveClassifier.set("darwin-x86_64")
|
||||
archiveExtension.set('tar.gz')
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
|
||||
include ":distribution:bwc:bugfix"
|
||||
include ":distribution:bwc:minor"
|
||||
include ":distribution:archives:oss-darwin-tar"
|
||||
include ":distribution:archives:darwin-tar"
|
||||
|
|
|
@ -203,20 +203,18 @@ class ClusterFormationTasks {
|
|||
}
|
||||
return
|
||||
}
|
||||
distro = 'oss'
|
||||
|
||||
Version version = Version.fromString(opensearchVersion)
|
||||
String os = getOs()
|
||||
String classifier = "-${os}-x86_64"
|
||||
String packaging = os.equals('windows') ? 'zip' : 'tar.gz'
|
||||
String artifactName = 'opensearch-oss'
|
||||
String artifactName = 'opensearch'
|
||||
Object dependency
|
||||
String snapshotProject = "${os}-${os.equals('windows') ? 'zip' : 'tar'}"
|
||||
if (version.before("7.0.0")) {
|
||||
snapshotProject = "zip"
|
||||
packaging = "zip"
|
||||
}
|
||||
snapshotProject = "oss-" + snapshotProject
|
||||
|
||||
BwcVersions.UnreleasedVersionInfo unreleasedInfo = null
|
||||
|
||||
|
|
|
@ -206,6 +206,6 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
|
|||
}
|
||||
|
||||
String group = distribution.getVersion().endsWith("-SNAPSHOT") ? FAKE_SNAPSHOT_IVY_GROUP : FAKE_IVY_GROUP;
|
||||
return group + ":opensearch-oss" + ":" + distribution.getVersion() + classifier + "@" + extension;
|
||||
return group + ":opensearch" + ":" + distribution.getVersion() + classifier + "@" + extension;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@ public class InternalDistributionArchiveSetupPlugin implements Plugin<Project> {
|
|||
project.getTasks().withType(AbstractArchiveTask.class).configureEach(t -> {
|
||||
String subdir = archiveTaskToSubprojectName(t.getName());
|
||||
t.getDestinationDirectory().set(project.file(subdir + "/build/distributions"));
|
||||
t.getArchiveBaseName().set("opensearch-oss");
|
||||
t.getArchiveBaseName().set("opensearch");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
|
|||
|
||||
private void registerDistributionArchiveArtifact(Project bwcProject, DistributionProject distributionProject, String buildBwcTask) {
|
||||
String artifactFileName = distributionProject.getDistFile().getName();
|
||||
String artifactName = "opensearch-oss";
|
||||
String artifactName = "opensearch";
|
||||
|
||||
String suffix = artifactFileName.endsWith("tar.gz") ? "tar.gz" : artifactFileName.substring(artifactFileName.length() - 3);
|
||||
int archIndex = artifactFileName.indexOf("x86_64");
|
||||
|
@ -154,13 +154,13 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
|
|||
|
||||
private static List<DistributionProject> resolveArchiveProjects(File checkoutDir, Version bwcVersion) {
|
||||
List<String> projects = new ArrayList<>();
|
||||
// All active BWC branches publish default and oss variants of rpm and deb packages
|
||||
projects.addAll(asList("oss-deb", "oss-rpm"));
|
||||
// All active BWC branches publish rpm and deb packages
|
||||
projects.addAll(asList("deb", "rpm"));
|
||||
|
||||
if (bwcVersion.onOrAfter("7.0.0")) { // starting with 7.0 we bundle a jdk which means we have platform-specific archives
|
||||
projects.addAll(asList("oss-windows-zip", "oss-darwin-tar", "oss-linux-tar"));
|
||||
} else { // prior to 7.0 we published only a single zip and tar archives for oss and default distributions
|
||||
projects.addAll(asList("oss-zip", "oss-tar"));
|
||||
projects.addAll(asList("windows-zip", "darwin-tar", "linux-tar"));
|
||||
} else { // prior to 7.0 we published only a single zip and tar archives
|
||||
projects.addAll(asList("zip", "tar"));
|
||||
}
|
||||
|
||||
return projects.stream().map(name -> {
|
||||
|
@ -170,7 +170,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
|
|||
if (bwcVersion.onOrAfter("7.0.0")) {
|
||||
if (name.contains("zip") || name.contains("tar")) {
|
||||
int index = name.lastIndexOf('-');
|
||||
String baseName = name.substring(4, index); // oss-
|
||||
String baseName = name.substring(0, index);
|
||||
classifier = "-" + baseName + "-x86_64";
|
||||
extension = name.substring(index + 1);
|
||||
if (extension.equals("tar")) {
|
||||
|
@ -241,7 +241,7 @@ public class InternalDistributionBwcSetupPlugin implements Plugin<Project> {
|
|||
this.projectPath = baseDir + "/" + name;
|
||||
this.distFile = new File(
|
||||
checkoutDir,
|
||||
baseDir + "/" + name + "/build/distributions/opensearch-oss-" + version + "-SNAPSHOT" + classifier + "." + extension
|
||||
baseDir + "/" + name + "/build/distributions/opensearch-" + version + "-SNAPSHOT" + classifier + "." + extension
|
||||
);
|
||||
// we only ported this down to the 7.x branch.
|
||||
if (version.onOrAfter("7.10.0") && (name.endsWith("zip") || name.endsWith("tar"))) {
|
||||
|
|
|
@ -167,8 +167,6 @@ public class InternalDistributionDownloadPlugin implements Plugin<Project> {
|
|||
? ""
|
||||
: "-" + architecture.toString().toLowerCase();
|
||||
|
||||
projectName += "oss-";
|
||||
|
||||
if (distribution.getBundledJdk() == false) {
|
||||
projectName += "no-jdk-";
|
||||
}
|
||||
|
@ -179,7 +177,7 @@ public class InternalDistributionDownloadPlugin implements Plugin<Project> {
|
|||
? "-zip"
|
||||
: "-tar");
|
||||
} else {
|
||||
projectName = "oss-zip";
|
||||
projectName = "zip";
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -288,11 +288,6 @@ public class DistributionDownloadPluginTests extends GradleUnitTestCase {
|
|||
}
|
||||
|
||||
private static String projectName(String base, boolean bundledJdk) {
|
||||
String prefix = "oss-";
|
||||
if (bundledJdk == false) {
|
||||
prefix += "no-jdk-";
|
||||
}
|
||||
|
||||
return prefix + base;
|
||||
return bundledJdk ? base : ("no-jdk-" + base);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,49 +88,49 @@ distribution_archives {
|
|||
}
|
||||
}
|
||||
|
||||
ossWindowsZip {
|
||||
windowsZip {
|
||||
archiveClassifier = 'windows-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', true)
|
||||
}
|
||||
}
|
||||
|
||||
ossNoJdkWindowsZip {
|
||||
noJdkWindowsZip {
|
||||
archiveClassifier = 'no-jdk-windows-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('windows-x86_64'), 'zip', 'windows', 'x64', false)
|
||||
}
|
||||
}
|
||||
|
||||
ossDarwinTar {
|
||||
darwinTar {
|
||||
archiveClassifier = 'darwin-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', true)
|
||||
}
|
||||
}
|
||||
|
||||
ossNoJdkDarwinTar {
|
||||
noJdkDarwinTar {
|
||||
archiveClassifier = 'no-jdk-darwin-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('darwin-x86_64'), 'tar', 'darwin', 'x64', false)
|
||||
}
|
||||
}
|
||||
|
||||
ossLinuxAarch64Tar {
|
||||
linuxAarch64Tar {
|
||||
archiveClassifier = 'linux-aarch64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('linux-aarch64'), 'tar', 'linux', 'aarch64', true)
|
||||
}
|
||||
}
|
||||
|
||||
ossLinuxTar {
|
||||
linuxTar {
|
||||
archiveClassifier = 'linux-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', true)
|
||||
}
|
||||
}
|
||||
|
||||
ossNoJdkLinuxTar {
|
||||
noJdkLinuxTar {
|
||||
archiveClassifier = 'no-jdk-linux-x86_64'
|
||||
content {
|
||||
archiveFiles(modulesFiles('linux-x86_64'), 'tar', 'linux', 'x64', false)
|
||||
|
@ -142,5 +142,5 @@ subprojects {
|
|||
apply plugin: 'distribution'
|
||||
apply plugin: 'opensearch.internal-distribution-archive-check'
|
||||
|
||||
group = "org.opensearch.distribution.oss"
|
||||
group = "org.opensearch.distribution"
|
||||
}
|
||||
|
|
|
@ -69,11 +69,11 @@ tasks.register("generateDependenciesReport", ConcatFilesTask) {
|
|||
// integ test zip only uses server, so a different notice file is needed there
|
||||
def buildServerNoticeTaskProvider = tasks.register("buildServerNotice", NoticeTask)
|
||||
|
||||
def buildOssNoticeTaskProvider = tasks.register("buildOssNotice", NoticeTask) {
|
||||
def buildNoticeTaskProvider = tasks.register("buildNotice", NoticeTask) {
|
||||
licensesDir new File(project(':distribution').projectDir, 'licenses')
|
||||
}
|
||||
|
||||
def buildOssNoJdkNoticeTaskProvider = tasks.register("buildOssNoJdkNotice", NoticeTask)
|
||||
def buildNoJdkNoticeTaskProvider = tasks.register("buildNoJdkNotice", NoticeTask)
|
||||
|
||||
// The :server and :libs projects belong to all distributions
|
||||
tasks.withType(NoticeTask).configureEach {
|
||||
|
@ -88,13 +88,13 @@ tasks.withType(NoticeTask).configureEach {
|
|||
/*****************************************************************************
|
||||
* Modules *
|
||||
*****************************************************************************/
|
||||
String ossOutputs = 'build/outputs/oss'
|
||||
String distOutputs = 'build/outputs/dist'
|
||||
String systemdOutputs = 'build/outputs/systemd'
|
||||
String transportOutputs = 'build/outputs/transport-only'
|
||||
String externalTestOutputs = 'build/outputs/external-test'
|
||||
|
||||
def processOssOutputsTaskProvider = tasks.register("processOssOutputs", Sync) {
|
||||
into ossOutputs
|
||||
def processOutputsTaskProvider = tasks.register("processOutputs", Sync) {
|
||||
into distOutputs
|
||||
}
|
||||
|
||||
def processSystemdOutputsTaskProvider = tasks.register("processSystemdOutputs", Sync) {
|
||||
|
@ -112,17 +112,17 @@ def processTransportOutputsTaskProvider = tasks.register("processTransportOutput
|
|||
}
|
||||
|
||||
// these are dummy tasks that can be used to depend on the relevant sub output dir
|
||||
def buildOssModulesTaskProvider = tasks.register("buildOssModules") {
|
||||
dependsOn processOssOutputsTaskProvider
|
||||
outputs.dir "${ossOutputs}/modules"
|
||||
def buildModulesTaskProvider = tasks.register("buildModules") {
|
||||
dependsOn processOutputsTaskProvider
|
||||
outputs.dir "${distOutputs}/modules"
|
||||
}
|
||||
tasks.register("buildOssBin") {
|
||||
dependsOn "processOssOutputs"
|
||||
outputs.dir "${ossOutputs}/bin"
|
||||
tasks.register("buildBin") {
|
||||
dependsOn "processOutputs"
|
||||
outputs.dir "${distOutputs}/bin"
|
||||
}
|
||||
tasks.register("buildOssConfig") {
|
||||
dependsOn "processOssOutputs"
|
||||
outputs.dir "${ossOutputs}/config"
|
||||
tasks.register("buildConfig") {
|
||||
dependsOn "processOutputs"
|
||||
outputs.dir "${distOutputs}/config"
|
||||
}
|
||||
def buildSystemdModuleTaskProvider = tasks.register("buildSystemdModule") {
|
||||
dependsOn "processSystemdOutputs"
|
||||
|
@ -172,10 +172,10 @@ void copyModule(TaskProvider<Sync> copyTask, Project module) {
|
|||
}
|
||||
|
||||
// log4j config could be contained in modules, so we must join it together using these tasks
|
||||
def buildOssLog4jConfigTaskProvider = tasks.register("buildOssLog4jConfig") {
|
||||
dependsOn "processOssOutputs"
|
||||
def buildLog4jConfigTaskProvider = tasks.register("buildLog4jConfig") {
|
||||
dependsOn "processOutputs"
|
||||
ext.contents = []
|
||||
ext.log4jFile = file("${ossOutputs}/log4j2.properties")
|
||||
ext.log4jFile = file("${distOutputs}/log4j2.properties")
|
||||
outputs.file log4jFile
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ Closure writeLog4jProperties = {
|
|||
it.log4jFile.append(moduleLog4jProperties, 'UTF-8')
|
||||
}
|
||||
}
|
||||
buildOssLog4jConfigTaskProvider.configure {
|
||||
buildLog4jConfigTaskProvider.configure {
|
||||
doLast(writeLog4jProperties)
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ void copyLog4jProperties(TaskProvider buildTask, Project module) {
|
|||
ext.restTestExpansions = [
|
||||
'expected.modules.count': 0,
|
||||
]
|
||||
// we create the buildOssModules task above but fill it here so we can do a single
|
||||
// we create the buildModules task above but fill it here so we can do a single
|
||||
// loop over modules to also setup cross task dependencies and increment our modules counter
|
||||
project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each { Project module ->
|
||||
if (module.name == 'systemd') {
|
||||
|
@ -222,18 +222,18 @@ project.rootProject.subprojects.findAll { it.parent.path == ':modules' }.each {
|
|||
}
|
||||
File licenses = new File(module.projectDir, 'licenses')
|
||||
if (licenses.exists()) {
|
||||
buildOssNotice.configure {
|
||||
buildNotice.configure {
|
||||
licensesDir licenses
|
||||
source module.file('src/main/java')
|
||||
}
|
||||
}
|
||||
|
||||
copyModule(processOssOutputsTaskProvider, module)
|
||||
copyModule(processOutputsTaskProvider, module)
|
||||
if (module.name.startsWith('transport-')) {
|
||||
copyModule(processTransportOutputsTaskProvider, module)
|
||||
}
|
||||
|
||||
copyLog4jProperties(buildOssLog4jConfigTaskProvider, module)
|
||||
copyLog4jProperties(buildLog4jConfigTaskProvider, module)
|
||||
|
||||
restTestExpansions['expected.modules.count'] += 1
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
|
|||
it.mode = 0644
|
||||
}
|
||||
}
|
||||
def buildModules = buildOssModulesTaskProvider
|
||||
def buildModules = buildModulesTaskProvider
|
||||
List excludePlatforms = ['linux-x86_64', 'linux-aarch64', 'windows-x86_64', 'darwin-x86_64']
|
||||
if (platform != null) {
|
||||
excludePlatforms.remove(excludePlatforms.indexOf(platform))
|
||||
|
@ -353,8 +353,8 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
|
|||
exclude 'log4j2.properties' // this is handled separately below
|
||||
MavenFilteringHack.filter(it, expansionsForDistribution(distributionType, jdk))
|
||||
}
|
||||
from project(':distribution').buildOssLog4jConfig
|
||||
from project(':distribution').buildOssConfig
|
||||
from project(':distribution').buildLog4jConfig
|
||||
from project(':distribution').buildConfig
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
|
|||
// module provided bin files
|
||||
with copySpec {
|
||||
eachFile { it.setMode(0755) }
|
||||
from project(':distribution').buildOssBin
|
||||
from project(':distribution').buildBin
|
||||
if (distributionType != 'zip') {
|
||||
exclude '*.bat'
|
||||
}
|
||||
|
@ -398,9 +398,9 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
|
|||
from buildServerNoticeTaskProvider
|
||||
} else {
|
||||
if (jdk) {
|
||||
from buildOssNoticeTaskProvider
|
||||
from buildNoticeTaskProvider
|
||||
} else {
|
||||
from buildOssNoJdkNoticeTaskProvider
|
||||
from buildNoJdkNoticeTaskProvider
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -583,13 +583,13 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
['archives:oss-windows-zip',
|
||||
'archives:oss-darwin-tar',
|
||||
'archives:oss-linux-aarch64-tar',
|
||||
'archives:oss-linux-tar',
|
||||
['archives:windows-zip',
|
||||
'archives:darwin-tar',
|
||||
'archives:linux-aarch64-tar',
|
||||
'archives:linux-tar',
|
||||
'archives:integ-test-zip',
|
||||
'packages:oss-rpm', 'packages:oss-deb',
|
||||
'packages:aarch64-oss-rpm', 'packages:aarch64-oss-deb'
|
||||
'packages:rpm', 'packages:deb',
|
||||
'packages:aarch64-rpm', 'packages:aarch64-deb'
|
||||
].forEach { subName ->
|
||||
Project subproject = project("${project.path}:${subName}")
|
||||
Configuration configuration = configurations.create(subproject.name)
|
||||
|
|
|
@ -24,13 +24,13 @@ apply plugin: 'opensearch.rest-resources'
|
|||
testFixtures.useFixture()
|
||||
|
||||
configurations {
|
||||
aarch64OssDockerSource
|
||||
ossDockerSource
|
||||
aarch64DockerSource
|
||||
dockerSource
|
||||
}
|
||||
|
||||
dependencies {
|
||||
aarch64OssDockerSource project(path: ":distribution:archives:oss-linux-aarch64-tar", configuration:"default")
|
||||
ossDockerSource project(path: ":distribution:archives:oss-linux-tar", configuration:"default")
|
||||
aarch64DockerSource project(path: ":distribution:archives:linux-aarch64-tar", configuration:"default")
|
||||
dockerSource project(path: ":distribution:archives:linux-tar", configuration:"default")
|
||||
}
|
||||
|
||||
ext.expansions = { Architecture architecture, DockerBase base, boolean local ->
|
||||
|
@ -50,7 +50,7 @@ ext.expansions = { Architecture architecture, DockerBase base, boolean local ->
|
|||
classifier = "linux-\$(arch)"
|
||||
}
|
||||
|
||||
final String opensearch = "opensearch-oss-${VersionProperties.getOpenSearch()}-${classifier}.tar.gz"
|
||||
final String opensearch = "opensearch-${VersionProperties.getOpenSearch()}-${classifier}.tar.gz"
|
||||
|
||||
/* Both the following Dockerfile commands put the resulting artifact at
|
||||
* the same location, regardless of classifier, so that the commands that
|
||||
|
@ -83,14 +83,12 @@ RUN curl --retry 8 -S -L \\
|
|||
private static String buildPath(Architecture architecture, DockerBase base) {
|
||||
return 'build/' +
|
||||
(architecture == Architecture.AARCH64 ? 'aarch64-' : '') +
|
||||
'oss-' +
|
||||
'docker'
|
||||
}
|
||||
|
||||
private static String taskName(String prefix, Architecture architecture, DockerBase base, String suffix) {
|
||||
return prefix +
|
||||
(architecture == Architecture.AARCH64 ? 'Aarch64' : '') +
|
||||
'Oss' +
|
||||
suffix
|
||||
}
|
||||
|
||||
|
@ -114,7 +112,7 @@ project.ext {
|
|||
|
||||
void addCopyDockerContextTask(Architecture architecture, DockerBase base) {
|
||||
if (base != DockerBase.CENTOS) {
|
||||
throw new GradleException("The only allowed docker base image for OSS builds is CENTOS")
|
||||
throw new GradleException("The only allowed docker base image for builds is CENTOS")
|
||||
}
|
||||
|
||||
tasks.register(taskName("copy", architecture, base, "DockerContext"), Sync) {
|
||||
|
@ -126,9 +124,9 @@ void addCopyDockerContextTask(Architecture architecture, DockerBase base) {
|
|||
with dockerBuildContext(architecture, base, true)
|
||||
|
||||
if (architecture == Architecture.AARCH64) {
|
||||
from configurations.aarch64OssDockerSource
|
||||
from configurations.aarch64DockerSource
|
||||
} else {
|
||||
from configurations.ossDockerSource
|
||||
from configurations.dockerSource
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,12 +156,12 @@ tasks.named("preProcessFixture").configure {
|
|||
doLast {
|
||||
// tests expect to have an empty repo
|
||||
project.delete(
|
||||
"${buildDir}/oss-repo"
|
||||
"${buildDir}/repo"
|
||||
)
|
||||
createAndSetWritable(
|
||||
"${buildDir}/oss-repo",
|
||||
"${buildDir}/logs/oss-1",
|
||||
"${buildDir}/logs/oss-2"
|
||||
"${buildDir}/repo",
|
||||
"${buildDir}/logs/1",
|
||||
"${buildDir}/logs/2"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +178,7 @@ tasks.named("check").configure {
|
|||
|
||||
void addBuildDockerImage(Architecture architecture, DockerBase base) {
|
||||
if (base != DockerBase.CENTOS) {
|
||||
throw new GradleException("The only allowed docker base image for OSS builds is CENTOS")
|
||||
throw new GradleException("The only allowed docker base image for builds is CENTOS")
|
||||
}
|
||||
|
||||
final TaskProvider<DockerBuildTask> buildDockerImageTask =
|
||||
|
@ -193,8 +191,8 @@ void addBuildDockerImage(Architecture architecture, DockerBase base) {
|
|||
|
||||
String version = VersionProperties.getOpenSearch()
|
||||
tags = [
|
||||
"docker.opensearch.org/opensearch/opensearch-oss:${version}",
|
||||
"opensearch-oss:test"
|
||||
"docker.opensearch.org/opensearch:${version}",
|
||||
"opensearch:test"
|
||||
]
|
||||
}
|
||||
tasks.named("assemble").configure {
|
||||
|
@ -203,7 +201,7 @@ void addBuildDockerImage(Architecture architecture, DockerBase base) {
|
|||
}
|
||||
|
||||
for (final Architecture architecture : Architecture.values()) {
|
||||
// We only create Docker images for the OSS distribution on CentOS.
|
||||
// We only create Docker images for the distribution on CentOS.
|
||||
for (final DockerBase base : DockerBase.values()) {
|
||||
if (base == DockerBase.CENTOS) {
|
||||
addCopyDockerContextTask(architecture, base)
|
||||
|
@ -231,9 +229,8 @@ subprojects { Project subProject ->
|
|||
final DockerBase base = DockerBase.CENTOS
|
||||
|
||||
final String arch = architecture == Architecture.AARCH64 ? '-aarch64' : ''
|
||||
final String suffix = '-oss'
|
||||
final String extension = 'docker.tar'
|
||||
final String artifactName = "opensearch${arch}${suffix}_test"
|
||||
final String artifactName = "opensearch${arch}_test"
|
||||
|
||||
final String exportTaskName = taskName("export", architecture, base, "DockerImage")
|
||||
final String buildTaskName = taskName("build", architecture, base, "DockerImage")
|
||||
|
@ -246,7 +243,7 @@ subprojects { Project subProject ->
|
|||
args "save",
|
||||
"-o",
|
||||
tarFile,
|
||||
"opensearch${suffix}:test"
|
||||
"opensearch:test"
|
||||
|
||||
dependsOn(parent.path + ":" + buildTaskName)
|
||||
onlyIf { Architecture.current() == architecture }
|
||||
|
|
|
@ -13,13 +13,13 @@ import org.opensearch.gradle.DockerBase
|
|||
|
||||
apply plugin: 'base'
|
||||
|
||||
tasks.register("buildOssDockerBuildContext", Tar) {
|
||||
tasks.register("buildDockerBuildContext", Tar) {
|
||||
archiveExtension = 'tar.gz'
|
||||
compression = Compression.GZIP
|
||||
archiveClassifier = "docker-build-context"
|
||||
archiveBaseName = "opensearch-oss"
|
||||
archiveBaseName = "opensearch"
|
||||
// Non-local builds don't need to specify an architecture.
|
||||
with dockerBuildContext(null, DockerBase.CENTOS, false)
|
||||
}
|
||||
|
||||
tasks.named("assemble").configure { dependsOn "buildOssDockerBuildContext" }
|
||||
tasks.named("assemble").configure { dependsOn "buildDockerBuildContext" }
|
|
@ -1,13 +1,13 @@
|
|||
# Only used for testing the docker images
|
||||
version: '3'
|
||||
services:
|
||||
opensearch-oss-1:
|
||||
image: opensearch-oss:test
|
||||
opensearch-1:
|
||||
image: opensearch:test
|
||||
environment:
|
||||
- node.name=opensearch-oss-1
|
||||
- cluster.initial_master_nodes=opensearch-oss-1,opensearch-oss-2
|
||||
- discovery.seed_hosts=opensearch-oss-2:9300
|
||||
- cluster.name=opensearch-oss
|
||||
- node.name=opensearch-1
|
||||
- cluster.initial_master_nodes=opensearch-1,opensearch-2
|
||||
- discovery.seed_hosts=opensearch-2:9300
|
||||
- cluster.name=opensearch
|
||||
- bootstrap.memory_lock=true
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- path.repo=/tmp/opensearch-repo
|
||||
|
@ -17,21 +17,21 @@ services:
|
|||
- cluster.routing.allocation.disk.watermark.flood_stage=1b
|
||||
- node.store.allow_mmap=false
|
||||
volumes:
|
||||
- ./build/oss-repo:/tmp/opensearch-repo
|
||||
- ./build/logs/oss-1:/usr/share/opensearch/logs
|
||||
- ./build/repo:/tmp/opensearch-repo
|
||||
- ./build/logs/1:/usr/share/opensearch/logs
|
||||
ports:
|
||||
- "9200"
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
hard: -1
|
||||
opensearch-oss-2:
|
||||
image: opensearch-oss:test
|
||||
opensearch-2:
|
||||
image: opensearch:test
|
||||
environment:
|
||||
- node.name=opensearch-oss-2
|
||||
- cluster.initial_master_nodes=opensearch-oss-1,opensearch-oss-2
|
||||
- discovery.seed_hosts=opensearch-oss-1:9300
|
||||
- cluster.name=opensearch-oss
|
||||
- node.name=opensearch-2
|
||||
- cluster.initial_master_nodes=opensearch-1,opensearch-2
|
||||
- discovery.seed_hosts=opensearch-1:9300
|
||||
- cluster.name=opensearch
|
||||
- bootstrap.memory_lock=true
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
- path.repo=/tmp/opensearch-repo
|
||||
|
@ -41,8 +41,8 @@ services:
|
|||
- cluster.routing.allocation.disk.watermark.flood_stage=1b
|
||||
- node.store.allow_mmap=false
|
||||
volumes:
|
||||
- ./build/oss-repo:/tmp/opensearch-repo
|
||||
- ./build/logs/oss-2:/usr/share/opensearch/logs
|
||||
- ./build/repo:/tmp/opensearch-repo
|
||||
- ./build/logs/2:/usr/share/opensearch/logs
|
||||
ports:
|
||||
- "9200"
|
||||
ulimits:
|
||||
|
|
|
@ -55,10 +55,10 @@ public class DockerYmlTestSuiteIT extends OpenSearchClientYamlSuiteTestCase {
|
|||
protected String getTestRestCluster() {
|
||||
return new StringBuilder()
|
||||
.append("localhost:")
|
||||
.append(getProperty("test.fixtures.opensearch-oss-1.tcp.9200"))
|
||||
.append(getProperty("test.fixtures.opensearch-1.tcp.9200"))
|
||||
.append(",")
|
||||
.append("localhost:")
|
||||
.append(getProperty("test.fixtures.opensearch-oss-2.tcp.9200"))
|
||||
.append(getProperty("test.fixtures.opensearch-2.tcp.9200"))
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -67,9 +67,9 @@ plugins {
|
|||
}
|
||||
|
||||
void addProcessFilesTask(String type, boolean jdk) {
|
||||
String packagingFiles = "build/packaging/oss-${jdk ? '' : 'no-jdk-'}${type}"
|
||||
String packagingFiles = "build/packaging/${jdk ? '' : 'no-jdk-'}${type}"
|
||||
|
||||
String taskName = "processOss'${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
|
||||
String taskName = "process'${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
|
||||
tasks.register(taskName, Copy) {
|
||||
into packagingFiles
|
||||
|
||||
|
@ -110,8 +110,8 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) {
|
|||
onlyIf {
|
||||
OS.current().equals(OS.WINDOWS) == false
|
||||
}
|
||||
dependsOn "processOss'${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
|
||||
packageName "opensearch-oss"
|
||||
dependsOn "process'${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
|
||||
packageName "opensearch"
|
||||
if (type == 'deb') {
|
||||
if (architecture == 'x64') {
|
||||
arch('amd64')
|
||||
|
@ -130,13 +130,13 @@ Closure commonPackageConfig(String type, boolean jdk, String architecture) {
|
|||
}
|
||||
// Follow opensearch's file naming convention
|
||||
String jdkString = jdk ? "" : "no-jdk-"
|
||||
String prefix = "${architecture == 'aarch64' ? 'aarch64-' : ''}oss-${jdk ? '' : 'no-jdk-'}${type}"
|
||||
String prefix = "${architecture == 'aarch64' ? 'aarch64-' : ''}${jdk ? '' : 'no-jdk-'}${type}"
|
||||
destinationDirectory = file("${prefix}/build/distributions")
|
||||
|
||||
// SystemPackagingTask overrides default archive task convention mappings, but doesn't provide a setter so we have to override the convention mapping itself
|
||||
conventionMapping.archiveFile = { objects.fileProperty().fileValue(file("${destinationDirectory.get()}/${packageName}-${project.version}-${jdkString}${archString}.${type}")) }
|
||||
|
||||
String packagingFiles = "build/packaging/oss-${jdk ? '' : 'no-jdk-'}${type}"
|
||||
String packagingFiles = "build/packaging/${jdk ? '' : 'no-jdk-'}${type}"
|
||||
|
||||
String scripts = "${packagingFiles}/scripts"
|
||||
preInstall file("${scripts}/preinst")
|
||||
|
@ -336,20 +336,19 @@ Closure commonDebConfig(boolean jdk, String architecture) {
|
|||
|
||||
into('/usr/share/lintian/overrides') {
|
||||
from('src/deb/lintian/opensearch')
|
||||
rename('opensearch', 'opensearch-oss')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('buildAarch64OssDeb', Deb) {
|
||||
tasks.register('buildAarch64Deb', Deb) {
|
||||
configure(commonDebConfig(true, 'aarch64'))
|
||||
}
|
||||
|
||||
tasks.register('buildOssDeb', Deb) {
|
||||
tasks.register('buildDeb', Deb) {
|
||||
configure(commonDebConfig(true, 'x64'))
|
||||
}
|
||||
|
||||
tasks.register('buildOssNoJdkDeb', Deb) {
|
||||
tasks.register('buildNoJdkDeb', Deb) {
|
||||
configure(commonDebConfig(true, 'x64'))
|
||||
}
|
||||
|
||||
|
@ -378,15 +377,15 @@ Closure commonRpmConfig(boolean jdk, String architecture) {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.register('buildAarch64OssRpm', Rpm) {
|
||||
tasks.register('buildAarch64Rpm', Rpm) {
|
||||
configure(commonRpmConfig(true, 'aarch64'))
|
||||
}
|
||||
|
||||
tasks.register('buildOssRpm', Rpm) {
|
||||
tasks.register('buildRpm', Rpm) {
|
||||
configure(commonRpmConfig(true, 'x64'))
|
||||
}
|
||||
|
||||
tasks.register('buildOssNoJdkRpm', Rpm) {
|
||||
tasks.register('buildNoJdkRpm', Rpm) {
|
||||
configure(commonRpmConfig(true, 'x64'))
|
||||
}
|
||||
|
||||
|
@ -464,7 +463,7 @@ subprojects {
|
|||
Path copyrightPath
|
||||
String expectedLicense
|
||||
String licenseFilename
|
||||
copyrightPath = packageExtractionDir.toPath().resolve("usr/share/doc/opensearch-oss/copyright")
|
||||
copyrightPath = packageExtractionDir.toPath().resolve("usr/share/doc/opensearch/copyright")
|
||||
expectedLicense = "ASL-2.0"
|
||||
licenseFilename = "APACHE-LICENSE-2.0.txt"
|
||||
final List<String> header = Arrays.asList("Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/",
|
||||
|
|
|
@ -170,10 +170,10 @@ public class Archives {
|
|||
}
|
||||
|
||||
public static void verifyArchiveInstallation(Installation installation, Distribution distribution) {
|
||||
verifyOssInstallation(installation, distribution, ARCHIVE_OWNER);
|
||||
verifyInstallation(installation, distribution, ARCHIVE_OWNER);
|
||||
}
|
||||
|
||||
private static void verifyOssInstallation(Installation es, Distribution distribution, String owner) {
|
||||
private static void verifyInstallation(Installation es, Distribution distribution, String owner) {
|
||||
Stream.of(es.home, es.config, es.plugins, es.modules, es.logs).forEach(dir -> assertThat(dir, file(Directory, owner, owner, p755)));
|
||||
|
||||
assertThat(Files.exists(es.data), is(false));
|
||||
|
|
|
@ -116,11 +116,10 @@ public class Cleanup {
|
|||
// Doing rpm erase on both packages in one command will remove neither since both cannot be installed
|
||||
// this may leave behind config files in /etc/opensearch, but a later step in this cleanup will get them
|
||||
sh.runIgnoreExitCode("rpm --quiet -e opensearch");
|
||||
sh.runIgnoreExitCode("rpm --quiet -e opensearch-oss");
|
||||
}
|
||||
|
||||
if (isDPKG()) {
|
||||
sh.runIgnoreExitCode("dpkg --purge opensearch opensearch-oss");
|
||||
sh.runIgnoreExitCode("dpkg --purge opensearch");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -493,13 +493,13 @@ public class Docker {
|
|||
}
|
||||
|
||||
/**
|
||||
* Perform a variety of checks on an installation. If the current distribution is not OSS, additional checks are carried out.
|
||||
* Perform a variety of checks on an installation.
|
||||
*/
|
||||
public static void verifyContainerInstallation(Installation installation, Distribution distribution) {
|
||||
verifyOssInstallation(installation);
|
||||
verifyInstallation(installation);
|
||||
}
|
||||
|
||||
private static void verifyOssInstallation(Installation es) {
|
||||
private static void verifyInstallation(Installation es) {
|
||||
dockerShell.run("id opensearch");
|
||||
dockerShell.run("getent group opensearch");
|
||||
|
||||
|
|
|
@ -173,10 +173,10 @@ public class Packages {
|
|||
}
|
||||
|
||||
public static void verifyPackageInstallation(Installation installation, Distribution distribution, Shell sh) {
|
||||
verifyOssInstallation(installation, distribution, sh);
|
||||
verifyInstallation(installation, distribution, sh);
|
||||
}
|
||||
|
||||
private static void verifyOssInstallation(Installation opensearch, Distribution distribution, Shell sh) {
|
||||
private static void verifyInstallation(Installation opensearch, Distribution distribution, Shell sh) {
|
||||
|
||||
sh.run("id opensearch");
|
||||
sh.run("getent group opensearch");
|
||||
|
|
|
@ -56,12 +56,12 @@ preProcessFixture {
|
|||
doLast {
|
||||
// tests expect to have an empty repo
|
||||
project.delete(
|
||||
"${buildDir}/oss-repo"
|
||||
"${buildDir}/repo"
|
||||
)
|
||||
createAndSetWritable(
|
||||
"${buildDir}/oss-repo",
|
||||
"${buildDir}/logs/oss-1",
|
||||
"${buildDir}/logs/oss-2"
|
||||
"${buildDir}/repo",
|
||||
"${buildDir}/logs/1",
|
||||
"${buildDir}/logs/2"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# Only used for testing the docker images
|
||||
version: '3.7'
|
||||
services:
|
||||
opensearch-oss-1:
|
||||
image: opensearch-oss:test
|
||||
opensearch-1:
|
||||
image: opensearch:test
|
||||
environment:
|
||||
- node.name=opensearch-oss-1
|
||||
- cluster.initial_master_nodes=opensearch-oss-1
|
||||
- cluster.name=opensearch-oss-1
|
||||
- node.name=opensearch-1
|
||||
- cluster.initial_master_nodes=opensearch-1
|
||||
- cluster.name=opensearch-1
|
||||
- bootstrap.memory_lock=true
|
||||
- network.publish_host=127.0.0.1
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
|
@ -17,8 +17,8 @@ services:
|
|||
- cluster.routing.allocation.disk.watermark.flood_stage=1b
|
||||
- node.store.allow_mmap=false
|
||||
volumes:
|
||||
- ./build/oss-repo:/tmp/opensearch-repo
|
||||
- ./build/logs/oss-1:/usr/share/opensearch/logs
|
||||
- ./build/repo:/tmp/opensearch-repo
|
||||
- ./build/logs/1:/usr/share/opensearch/logs
|
||||
ports:
|
||||
- "9200"
|
||||
- "9300"
|
||||
|
@ -35,12 +35,12 @@ services:
|
|||
interval: 10s
|
||||
timeout: 2s
|
||||
retries: 5
|
||||
opensearch-oss-2:
|
||||
image: opensearch-oss:test
|
||||
opensearch-2:
|
||||
image: opensearch:test
|
||||
environment:
|
||||
- node.name=opensearch-oss-2
|
||||
- cluster.initial_master_nodes=opensearch-oss-2
|
||||
- cluster.name=opensearch-oss-2
|
||||
- node.name=opensearch-2
|
||||
- cluster.initial_master_nodes=opensearch-2
|
||||
- cluster.name=opensearch-2
|
||||
- bootstrap.memory_lock=true
|
||||
- network.publish_host=127.0.0.1
|
||||
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||
|
@ -51,8 +51,8 @@ services:
|
|||
- cluster.routing.allocation.disk.watermark.flood_stage=1b
|
||||
- node.store.allow_mmap=false
|
||||
volumes:
|
||||
- ./build/oss-repo:/tmp/opensearch-repo
|
||||
- ./build/logs/oss-2:/usr/share/opensearch/logs
|
||||
- ./build/repo:/tmp/opensearch-repo
|
||||
- ./build/logs/2:/usr/share/opensearch/logs
|
||||
ports:
|
||||
- "9200"
|
||||
- "9300"
|
||||
|
@ -71,4 +71,4 @@ services:
|
|||
ports:
|
||||
- "9600"
|
||||
volumes:
|
||||
- ./haproxy-oss.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
|
||||
|
|
|
@ -18,4 +18,4 @@ frontend ft_reg
|
|||
default_backend bk_reg
|
||||
|
||||
backend bk_reg
|
||||
server default opensearch-oss-2:9300 check
|
||||
server default opensearch-2:9300 check
|
|
@ -59,7 +59,7 @@ public abstract class AbstractMultiClusterRemoteTestCase extends OpenSearchRestT
|
|||
|
||||
@Override
|
||||
protected String getTestRestCluster() {
|
||||
return "localhost:" + getProperty("test.fixtures.opensearch-oss-1.tcp.9200");
|
||||
return "localhost:" + getProperty("test.fixtures.opensearch-1.tcp.9200");
|
||||
}
|
||||
|
||||
@Before
|
||||
|
@ -68,8 +68,8 @@ public abstract class AbstractMultiClusterRemoteTestCase extends OpenSearchRestT
|
|||
return;
|
||||
}
|
||||
|
||||
cluster1Client = buildClient("localhost:" + getProperty("test.fixtures.opensearch-oss-1.tcp.9200"));
|
||||
cluster2Client = buildClient("localhost:" + getProperty("test.fixtures.opensearch-oss-2.tcp.9200"));
|
||||
cluster1Client = buildClient("localhost:" + getProperty("test.fixtures.opensearch-1.tcp.9200"));
|
||||
cluster2Client = buildClient("localhost:" + getProperty("test.fixtures.opensearch-2.tcp.9200"));
|
||||
|
||||
cluster1Client().cluster().health(new ClusterHealthRequest().waitForNodes("1").waitForYellowStatus(), RequestOptions.DEFAULT);
|
||||
cluster2Client().cluster().health(new ClusterHealthRequest().waitForNodes("1").waitForYellowStatus(), RequestOptions.DEFAULT);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class RemoteClustersIT extends AbstractMultiClusterRemoteTestCase {
|
|||
}
|
||||
|
||||
public void testProxyModeConnectionWorks() throws IOException {
|
||||
String cluster2RemoteClusterSeed = "opensearch-oss-2:9300";
|
||||
String cluster2RemoteClusterSeed = "opensearch-2:9300";
|
||||
logger.info("Configuring remote cluster [{}]", cluster2RemoteClusterSeed);
|
||||
ClusterUpdateSettingsRequest request = new ClusterUpdateSettingsRequest().persistentSettings(Settings.builder()
|
||||
.put("cluster.remote.cluster2.mode", "proxy")
|
||||
|
@ -98,7 +98,7 @@ public class RemoteClustersIT extends AbstractMultiClusterRemoteTestCase {
|
|||
}
|
||||
|
||||
public void testSniffModeConnectionFails() throws IOException {
|
||||
String cluster2RemoteClusterSeed = "opensearch-oss-2:9300";
|
||||
String cluster2RemoteClusterSeed = "opensearch-2:9300";
|
||||
logger.info("Configuring remote cluster [{}]", cluster2RemoteClusterSeed);
|
||||
ClusterUpdateSettingsRequest request = new ClusterUpdateSettingsRequest().persistentSettings(Settings.builder()
|
||||
.put("cluster.remote.cluster2alt.mode", "sniff")
|
||||
|
|
|
@ -17,7 +17,7 @@ services:
|
|||
retries: 5
|
||||
|
||||
opensearch:
|
||||
image: opensearch-oss:test
|
||||
image: opensearch:test
|
||||
environment:
|
||||
discovery.type: single-node
|
||||
ulimits:
|
||||
|
|
|
@ -29,24 +29,24 @@ List projects = [
|
|||
'client:benchmark',
|
||||
'benchmarks',
|
||||
'distribution:archives:integ-test-zip',
|
||||
'distribution:archives:oss-windows-zip',
|
||||
'distribution:archives:oss-no-jdk-windows-zip',
|
||||
'distribution:archives:oss-darwin-tar',
|
||||
'distribution:archives:oss-no-jdk-darwin-tar',
|
||||
'distribution:archives:oss-linux-aarch64-tar',
|
||||
'distribution:archives:oss-linux-tar',
|
||||
'distribution:archives:oss-no-jdk-linux-tar',
|
||||
'distribution:archives:windows-zip',
|
||||
'distribution:archives:no-jdk-windows-zip',
|
||||
'distribution:archives:darwin-tar',
|
||||
'distribution:archives:no-jdk-darwin-tar',
|
||||
'distribution:archives:linux-aarch64-tar',
|
||||
'distribution:archives:linux-tar',
|
||||
'distribution:archives:no-jdk-linux-tar',
|
||||
'distribution:docker',
|
||||
'distribution:docker:oss-docker-aarch64-build-context',
|
||||
'distribution:docker:oss-docker-aarch64-export',
|
||||
'distribution:docker:oss-docker-build-context',
|
||||
'distribution:docker:oss-docker-export',
|
||||
'distribution:packages:aarch64-oss-deb',
|
||||
'distribution:packages:oss-deb',
|
||||
'distribution:packages:oss-no-jdk-deb',
|
||||
'distribution:packages:aarch64-oss-rpm',
|
||||
'distribution:packages:oss-rpm',
|
||||
'distribution:packages:oss-no-jdk-rpm',
|
||||
'distribution:docker:docker-aarch64-build-context',
|
||||
'distribution:docker:docker-aarch64-export',
|
||||
'distribution:docker:docker-build-context',
|
||||
'distribution:docker:docker-export',
|
||||
'distribution:packages:aarch64-deb',
|
||||
'distribution:packages:deb',
|
||||
'distribution:packages:no-jdk-deb',
|
||||
'distribution:packages:aarch64-rpm',
|
||||
'distribution:packages:rpm',
|
||||
'distribution:packages:no-jdk-rpm',
|
||||
'distribution:bwc:bugfix',
|
||||
'distribution:bwc:maintenance',
|
||||
'distribution:bwc:minor',
|
||||
|
|
Loading…
Reference in New Issue