Fix stragglers from renaming to OpenSearch work. (#483)

This commit fixes more instances where we missed renaming to OpenSearch.

Signed-off-by: Rabi Panda <adnapibar@gmail.com>
This commit is contained in:
Rabi Panda 2021-04-05 11:51:20 -07:00 committed by GitHub
parent 247772033a
commit 2dca3462f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 37 additions and 36 deletions

View File

@ -224,7 +224,9 @@ allprojects {
// other packages (e.g org.opensearch.client) will point to server rather than
// their own artifacts.
if (project.plugins.hasPlugin(BuildPlugin) || project.plugins.hasPlugin(PluginBuildPlugin)) {
String artifactsHost = VersionProperties.getOpenSearch().endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
String artifactsHost = VersionProperties.getOpenSearch().endsWith("-SNAPSHOT")
? "https://artifacts.opensearch.org/snapshots/"
: "https://artifacts.opensearch.org/releases/"
Closure sortClosure = { a, b -> b.group <=> a.group }
Closure depJavadocClosure = { shadowed, dep ->
if ((dep instanceof ProjectDependency) == false) {

View File

@ -114,7 +114,7 @@ abstract class AbstractGradleFuncTest extends Specification {
void setupLocalGitRepo() {
//TODO: cleanup
execute("git init")
execute('git config user.email "build-tool@elastic.co"')
execute('git config user.email "build-tool@opensearch.org"')
execute('git config user.name "Build tool"')
execute("git add .")
execute('git commit -m "Initial"')

View File

@ -140,7 +140,7 @@ class InternalDistributionBwcSetupPluginFuncTest extends AbstractGradleFuncTest
fakeRemote.file + "/.git"
gradleRunner(workingRemoteGit, "wrapper").build()
execute("git init", workingRemoteGit)
execute('git config user.email "build-tool@elastic.co"', workingRemoteGit)
execute('git config user.email "build-tool@opensearch.org"', workingRemoteGit)
execute('git config user.name "Build tool"', workingRemoteGit)
execute("git add .", workingRemoteGit)
execute('git commit -m"Initial"', workingRemoteGit)

View File

@ -103,7 +103,7 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
then:
result.task(":distribution:bwc:minor:buildBwcExpandedTask").outcome == TaskOutcome.SUCCESS
result.task(":setupDistro").outcome == TaskOutcome.SUCCESS
assertExtractedDistroIsCreated("distribution/bwc/minor/build/install/elastic-distro",
assertExtractedDistroIsCreated("distribution/bwc/minor/build/install/opensearch-distro",
'bwc-marker.txt')
}
@ -158,7 +158,7 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
configurations.create("expanded-oss-linux-tar")
def expandedTask = tasks.register("buildBwcExpandedTask", Copy) {
from('bwc-marker.txt')
into('build/install/elastic-distro')
into('build/install/opensearch-distro')
}
artifacts {
it.add("expanded-oss-linux-tar", file('build/install')) {

View File

@ -57,13 +57,13 @@ public class BuildPluginIT extends GradleIntegrationTestCase {
}
public void testInsecureMavenRepository() throws IOException {
final String name = "elastic-maven";
final String url = "http://s3.amazonaws.com/artifacts.elastic.co/maven";
final String name = "opensearch-maven";
final String url = "http://s3.amazonaws.com/artifacts.opensearch.org/maven";
// add an insecure maven repository to the build.gradle
final List<String> lines = Arrays.asList(
"repositories {",
" maven {",
" name \"elastic-maven\"",
" name \"opensearch-maven\"",
" url \"" + url + "\"\n",
" }",
"}"
@ -72,13 +72,13 @@ public class BuildPluginIT extends GradleIntegrationTestCase {
}
public void testInsecureIvyRepository() throws IOException {
final String name = "elastic-ivy";
final String url = "http://s3.amazonaws.com/artifacts.elastic.co/ivy";
final String name = "opensearch-ivy";
final String url = "http://s3.amazonaws.com/artifacts.opensearch.org/ivy";
// add an insecure ivy repository to the build.gradle
final List<String> lines = Arrays.asList(
"repositories {",
" ivy {",
" name \"elastic-ivy\"",
" name \"opensearch-ivy\"",
" url \"" + url + "\"\n",
" }",
"}"

View File

@ -155,8 +155,8 @@ public class DistributionDownloadPlugin implements Plugin<Project> {
if (project.getRepositories().findByName(DOWNLOAD_REPO_NAME) != null) {
return;
}
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://artifacts-no-kpi.elastic.co", FAKE_IVY_GROUP);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://snapshots-no-kpi.elastic.co", FAKE_SNAPSHOT_IVY_GROUP);
addIvyRepo(project, DOWNLOAD_REPO_NAME, "https://artifacts-no-kpi.opensearch.org", FAKE_IVY_GROUP);
addIvyRepo(project, SNAPSHOT_REPO_NAME, "https://snapshots-no-kpi.opensearch.org", FAKE_SNAPSHOT_IVY_GROUP);
}
/**

View File

@ -137,7 +137,7 @@ public class OpenSearchNodesSnifferParseTests extends RestClientTestCase {
HttpEntity entity = new InputStreamEntity(in, ContentType.APPLICATION_JSON);
List<Node> nodes = OpenSearchNodesSniffer.readHosts(entity, Scheme.HTTP, new JsonFactory());
assertEquals("elastic.test", nodes.get(0).getHost().getHostName());
assertEquals("opensearch.test", nodes.get(0).getHost().getHostName());
assertEquals(9200, nodes.get(0).getHost().getPort());
assertEquals("http", nodes.get(0).getHost().getSchemeName());
}

View File

@ -20,9 +20,9 @@
"attributes": { },
"http": {
"bound_address": [
"elastic.test:9200"
"opensearch.test:9200"
],
"publish_address": "elastic.test/127.0.0.1:9200",
"publish_address": "opensearch.test/127.0.0.1:9200",
"max_content_length_in_bytes": 104857600
}
}

View File

@ -474,7 +474,7 @@ configure(subprojects.findAll { ['archives', 'packages'].contains(it.name) }) {
* <dd>The default directory from which to load configuration. This is used in
* the packaging scripts, but in that context it is always
* /etc/opensearch. Its also used in bin/opensearch-plugin, where it is
* /etc/opensearch for the os packages but $OPENSEARCHHOME/config otherwise.</dd>
* /etc/opensearch for the os packages but $OPENSEARCH_HOME/config otherwise.</dd>
* <dt>path.env</dt>
* <dd>The env file sourced before bin/opensearch to set environment
* variables. Think /etc/defaults/opensearch.</dd>

View File

@ -2,4 +2,4 @@ Copyright (c) 1995, 2013, Oracle and/or its affiliates.
OpenJDK is licensed under the GPLv2+CE. A copy of that license is included in
this distribution immediately below this notice. You can find a copy of the
OpenJDK source through the downloads page at https://elastic.co.
OpenJDK source through the downloads page at https://opensearch.org.

View File

@ -458,6 +458,7 @@ subprojects {
licenseFilename = "APACHE-LICENSE-2.0.txt"
final List<String> header = Arrays.asList("Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/",
"Copyright: Elasticsearch B.V. <info@elastic.co>",
"Copyright: OpenSearch Contributors",
"License: " + expectedLicense)
final List<String> licenseLines = Files.readAllLines(rootDir.toPath().resolve("licenses/" + licenseFilename))
final List<String> expectedLines = header + licenseLines.collect { " " + it }

View File

@ -1,4 +1,5 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Copyright: Elasticsearch B.V. <info@elastic.co>
Copyright: OpenSearch Contributors
License: ${license.name}
${license.text}

View File

@ -44,6 +44,3 @@ hardening-no-pie usr/share/opensearch/jdk/lib/*
# the system java version that lintian assumes is far behind what opensearch uses
unknown-java-class-version
# elastic licensed modules contain elastic license
extra-license-file usr/share/opensearch/modules/*

View File

@ -14,7 +14,7 @@ set -e -o pipefail
# This script is intended to be sourced, not executed, and modifies the
# environment.
for VAR_NAME_FILE in ELASTIC_PASSWORD_FILE KEYSTORE_PASSWORD_FILE ; do
for VAR_NAME_FILE in OPENSEARCH_PASSWORD_FILE KEYSTORE_PASSWORD_FILE ; do
if [[ -n "${!VAR_NAME_FILE}" ]]; then
VAR_NAME="${VAR_NAME_FILE%_FILE}"

View File

@ -200,7 +200,7 @@ if "%OPENSEARCH_START_TYPE%" == "" set OPENSEARCH_START_TYPE=manual
if "%OPENSEARCH_STOP_TIMEOUT%" == "" set OPENSEARCH_STOP_TIMEOUT=0
if "%SERVICE_DISPLAY_NAME%" == "" set SERVICE_DISPLAY_NAME=OpenSearch %OPENSEARCH_VERSION% (%SERVICE_ID%)
if "%SERVICE_DESCRIPTION%" == "" set SERVICE_DESCRIPTION=OpenSearch %OPENSEARCH_VERSION% Windows Service - https://elastic.co
if "%SERVICE_DESCRIPTION%" == "" set SERVICE_DESCRIPTION=OpenSearch %OPENSEARCH_VERSION% Windows Service - https://opensearch.org
if not "%SERVICE_USERNAME%" == "" (
if not "%SERVICE_PASSWORD%" == "" (

View File

@ -28,11 +28,11 @@ teardown:
id: 1
pipeline: "1"
body: {
my_url: "https%3a%2f%2felastic.co%2f"
my_url: "https%3a%2f%2fopensearch.org%2f"
}
- do:
get:
index: test
id: 1
- match: { _source.my_url: "https://elastic.co/" }
- match: { _source.my_url: "https://opensearch.org/" }

View File

@ -49,7 +49,7 @@ public class ExampleFixtureIT extends OpenSearchTestCase {
BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8))
) {
writer.write("GET / HTTP/1.1\r\n");
writer.write("Host: elastic.co\r\n\r\n");
writer.write("Host: opensearch.org\r\n\r\n");
writer.flush();
final List<String> lines = new ArrayList<>();

View File

@ -72,7 +72,7 @@ dependencies {
// Set the keytab files in the classpath so that we can access them from test code without the security manager
// freaking out.
if (isEclipse == false) {
testRuntimeOnly files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.elastic.co.keytab").parent)
testRuntimeOnly files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.opensearch.org.keytab").parent)
}
}
@ -139,9 +139,9 @@ for (String fixtureName : ['hdfsFixture', 'haHdfsFixture', 'secureHdfsFixture',
// If it's a secure fixture, then set the principal name and keytab locations to use for auth.
if (fixtureName.equals('secureHdfsFixture') || fixtureName.equals('secureHaHdfsFixture')) {
miniHDFSArgs.add("hdfs/hdfs.build.elastic.co@${realm}")
miniHDFSArgs.add("hdfs/hdfs.build.opensearch.org@${realm}")
miniHDFSArgs.add(
project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.elastic.co.keytab")
project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.opensearch.org.keytab")
)
}
@ -201,12 +201,12 @@ for (String integTestTaskName : ['integTestHa', 'integTestSecure', 'integTestSec
if (integTestTaskName.contains("Secure")) {
if (disabledIntegTestTaskNames.contains(integTestTaskName) == false) {
nonInputProperties.systemProperty "test.krb5.principal.es", "elasticsearch@${realm}"
nonInputProperties.systemProperty "test.krb5.principal.hdfs", "hdfs/hdfs.build.elastic.co@${realm}"
nonInputProperties.systemProperty "test.krb5.principal.es", "opensearch@${realm}"
nonInputProperties.systemProperty "test.krb5.principal.hdfs", "hdfs/hdfs.build.opensearch.org@${realm}"
jvmArgs "-Djava.security.krb5.conf=${krb5conf}"
nonInputProperties.systemProperty(
"test.krb5.keytab.hdfs",
project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.elastic.co.keytab")
project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs", "hdfs_hdfs.build.opensearch.org.keytab")
)
}
}

View File

@ -1,9 +1,9 @@
FROM ubuntu:14.04
ADD . /fixture
RUN echo kerberos.build.elastic.co > /etc/hostname && echo "127.0.0.1 kerberos.build.elastic.co" >> /etc/hosts
RUN echo kerberos.build.opensearch.org > /etc/hostname && echo "127.0.0.1 kerberos.build.opensearch.org" >> /etc/hosts
RUN bash /fixture/src/main/resources/provision/installkdc.sh
EXPOSE 88
EXPOSE 88/udp
CMD sleep infinity
CMD sleep infinity

View File

@ -91,8 +91,8 @@ cat << EOF > /etc/krb5kdc/kadm5.acl
EOF
# Create admin principal
kadmin.local -q "addprinc -pw elastic admin/admin@$REALM_NAME"
kadmin.local -q "addprinc -pw opensearch admin/admin@$REALM_NAME"
kadmin.local -q "ktadd -k /etc/admin.keytab admin/admin@$REALM_NAME"
# Create a link so addprinc.sh is on path
ln -s $PROV_DIR/addprinc.sh /usr/bin/
ln -s $PROV_DIR/addprinc.sh /usr/bin/