Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPM M1] Add a new block to call the generation code for RPM #1545

Closed
Tracked by #27
peterzhuamazon opened this issue Jan 25, 2022 · 47 comments
Closed
Tracked by #27

[RPM M1] Add a new block to call the generation code for RPM #1545

peterzhuamazon opened this issue Jan 25, 2022 · 47 comments
Assignees
Labels

Comments

@peterzhuamazon
Copy link
Member

peterzhuamazon commented Jan 25, 2022

Tasks Estimate Status Notes Dependencies
The generation code should pull the artifacts from the build workflow to a temporary location 1 Complete   Build workflow must provide usable artifacts
The code will call existing install function to install plugins on min artifacts 1 Complete    
After installation, the code will execute a tool or utility to wrap all the content into a RPM package 5 Complete Require writing a script to utilize FPM to start with and later implement in pure python code.

20220204: We might change to rpmbuild directly without using FPM. See comments.
FPM usages
The code will also add dependencies to the RPM package so that things like JDK and additional libs for plugins can be installed and pulled separately 5 Complete Need to study on RPM dependency setups RPM Build Dependencies and the locations of each dependent artifact
The code will move the RPM package from the temp location to dist folder 2 Complete    
@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Feb 4, 2022

20220204: FPM is having some issues along the way:

  • Messy handling of folder structure, as it will add every single file under %files section instead of owning folders, so erase of the package will not do proper clean up.
  • Need to specifically set --rpm-summary for RPM, and debian has a different command, which is not suitable for the usages.
  • If build on non-linux machine, --rpm-os is needed as another specific command that debian version does not own.
  • Very large rpm spec file generated during runtimes, lack of many settings, need manual editing during runtime of the tool.
  • Cannot source a spec file directly for a build, have to use the existing template.
  • Documentation kind of lackluster as there are duplication of commands man page, and I need to dig through issues and issues to find some commands for my needs.

Overall, it is a great tool for quick building an RPM without spec file.
However, for our production usages I think using rpmbuild directly probably better here.

Still testing.

@peterzhuamazon peterzhuamazon changed the title We should add a new block specifically to call the generation code for RPM [RPM M1] We should add a new block specifically to call the generation code for RPM Feb 21, 2022
@peterzhuamazon peterzhuamazon self-assigned this Feb 28, 2022
@peterzhuamazon
Copy link
Member Author

It can finally run now with rpmbuild integrated:

Test Logs

% ./assemble.sh builds/opensearch/manifest.yml
Installing dependencies in . ...
Installing dependencies from Pipfile.lock (16e10a)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Running ./src/run_assemble.py builds/opensearch/manifest.yml ...
2022-03-09 02:25:41 INFO     Bundling OpenSearch (x64) on linux into /home/opensearch-build-peterzhuamazon/dist/opensearch ...
2022-03-09 02:25:41 INFO     Copied min bundle to /tmp/tmphii43sg4/opensearch-min-1.3.0-x64.rpm.
2022-03-09 02:25:41 INFO     Start creating distribution rpm for OpenSearch.
2022-03-09 02:25:41 INFO     Extracting dist into /tmp/tmphii43sg4.
2022-03-09 02:25:41 INFO     Convert rpm to cpio for extraction: /tmp/tmphii43sg4/opensearch-min-1.3.0-x64.rpm to /tmp/tmphii43sg4/opensearch-min-1.3.0-x64.cpio
2022-03-09 02:25:44 INFO     Extract cpio /tmp/tmphii43sg4/opensearch-min-1.3.0-x64.cpio content to /tmp/tmphii43sg4
2022-03-09 02:25:45 INFO     Move /tmp/tmphii43sg4/usr/share/opensearch to /tmp/tmphii43sg4/opensearch-1.3.0 for plugin installation
2022-03-09 02:25:45 INFO     Extracted dist into /tmp/tmphii43sg4.
2022-03-09 02:25:45 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch/install.sh -v 1.3.0 -p linux -a x64 -d rpm -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ DISTRIBUTION=rpm
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ '[' -z rpm ']'
+ '[' rpm = tar ']'
+ '[' rpm = rpm ']'
++ dirname /home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch/install.sh
+ DIR=/home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch
+ echo /home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch
/home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch
+ cd /home/opensearch-build-peterzhuamazon/scripts/components/OpenSearch
+ cp -a ../../../scripts/pkg/service_templates/opensearch/etc ../../../scripts/pkg/service_templates/opensearch/usr /tmp/tmphii43sg4/opensearch-1.3.0/../
+ cp -a ../../../scripts/pkg/build_templates/opensearch/opensearch.rpm.spec /tmp/tmphii43sg4/opensearch-1.3.0/../
2022-03-09 02:25:45 INFO     Installing job-scheduler
2022-03-09 02:25:45 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-job-scheduler-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-job-scheduler-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-job-scheduler-1.3.0.0.zip
-> Installed opensearch-job-scheduler with folder name opensearch-job-scheduler
2022-03-09 02:25:47 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:47 INFO     Installing alerting
2022-03-09 02:25:47 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-alerting-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-alerting-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-alerting-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-alerting with folder name opensearch-alerting
2022-03-09 02:25:48 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:48 INFO     Installing asynchronous-search
2022-03-09 02:25:48 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-asynchronous-search-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-asynchronous-search-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-asynchronous-search-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-asynchronous-search with folder name opensearch-asynchronous-search
2022-03-09 02:25:49 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:49 INFO     Installing index-management
2022-03-09 02:25:49 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-index-management-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-index-management-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-index-management-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-index-management with folder name opensearch-index-management
2022-03-09 02:25:51 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:51 INFO     Installing k-NN
2022-03-09 02:25:51 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-knn-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-knn-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-knn-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission loadLibrary.opensearchknn_faiss
* java.lang.RuntimePermission loadLibrary.opensearchknn_nmslib
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-knn with folder name opensearch-knn
2022-03-09 02:25:52 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:52 INFO     Installing security
2022-03-09 02:25:52 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-security-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-security-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-security-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.io.FilePermission /proc/sys/net/core/somaxconn#plus read
* java.io.SerializablePermission enableSubstitution
* java.lang.RuntimePermission accessClassInPackage.com.sun.jndi.*
* java.lang.RuntimePermission accessClassInPackage.sun.misc
* java.lang.RuntimePermission accessClassInPackage.sun.nio.ch
* java.lang.RuntimePermission accessClassInPackage.sun.security.x509
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission accessUserInformation
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.lang.RuntimePermission setContextClassLoader
* java.lang.RuntimePermission shutdownHooks
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.NetPermission getNetworkInformation
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,accept,resolve
* java.security.SecurityPermission getProperty.ssl.KeyManagerFactory.algorithm
* java.security.SecurityPermission insertProvider.BC
* java.security.SecurityPermission org.apache.xml.security.register
* java.security.SecurityPermission putProviderProperty.BC
* java.security.SecurityPermission setProperty.ocsp.enable
* java.util.PropertyPermission * read,write
* java.util.PropertyPermission org.apache.xml.security.ignoreLineBreaks write
* javax.security.auth.AuthPermission doAs
* javax.security.auth.AuthPermission modifyPrivateCredentials
* javax.security.auth.kerberos.ServicePermission * accept
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-security with folder name opensearch-security
2022-03-09 02:25:54 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:54 INFO     Installing performance-analyzer
2022-03-09 02:25:54 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-performance-analyzer-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-performance-analyzer-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-performance-analyzer-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* com.sun.tools.attach.AttachPermission attachVirtualMachine
* com.sun.tools.attach.AttachPermission createAttachProvider
* java.io.FilePermission /-#plus read,write,execute,delete,readlink
* java.io.FilePermission build/tmp/junit_metrics#plus read
* java.lang.RuntimePermission accessClassInPackage.jdk.internal.misc
* java.lang.RuntimePermission accessClassInPackage.sun.tools.attach
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission defineClass
* java.lang.RuntimePermission loadLibrary.attach
* java.lang.RuntimePermission manageProcess
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-performance-analyzer with folder name opensearch-performance-analyzer
2022-03-09 02:25:57 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/components/performance-analyzer/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ mv /tmp/tmphii43sg4/opensearch-1.3.0/plugins/opensearch-performance-analyzer/performance-analyzer-rca /tmp/tmphii43sg4/opensearch-1.3.0/
+ mv /tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli /tmp/tmphii43sg4/opensearch-1.3.0/bin
+ rm -rf /tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-performance-analyzer
2022-03-09 02:25:57 INFO     Installing anomaly-detection
2022-03-09 02:25:57 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-anomaly-detection-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-anomaly-detection-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-anomaly-detection-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessClassInPackage.sun.misc
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.RuntimePermission setContextClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.net.SocketPermission * connect,resolve
* javax.management.MBeanPermission org.apache.commons.pool2.impl.GenericObjectPool#-[org.apache.commons.pool2:name=pool,type=GenericObjectPool] registerMBean
* javax.management.MBeanPermission org.apache.commons.pool2.impl.GenericObjectPool#-[org.apache.commons.pool2:name=pool,type=GenericObjectPool] unregisterMBean
* javax.management.MBeanServerPermission createMBeanServer
* javax.management.MBeanTrustPermission register
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-anomaly-detection with folder name opensearch-anomaly-detection
2022-03-09 02:25:58 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:25:58 INFO     Installing cross-cluster-replication
2022-03-09 02:25:58 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-cross-cluster-replication-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-cross-cluster-replication-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-cross-cluster-replication-1.3.0.0.zip
-> Installed opensearch-cross-cluster-replication with folder name opensearch-cross-cluster-replication
2022-03-09 02:26:00 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:26:00 INFO     Installing sql
2022-03-09 02:26:00 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-sql-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-sql-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-sql-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission defineClass
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-sql with folder name opensearch-sql
2022-03-09 02:26:02 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:26:02 INFO     Installing dashboards-reports
2022-03-09 02:26:02 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-reports-scheduler-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-reports-scheduler-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-reports-scheduler-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-reports-scheduler with folder name opensearch-reports-scheduler
2022-03-09 02:26:04 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:26:04 INFO     Installing opensearch-observability
2022-03-09 02:26:04 INFO     Executing "/tmp/tmphii43sg4/opensearch-1.3.0/bin/opensearch-plugin install --batch file:/tmp/tmphii43sg4/opensearch-observability-1.3.0.0.zip" in /tmp/tmphii43sg4/opensearch-1.3.0
-> Installing file:/tmp/tmphii43sg4/opensearch-observability-1.3.0.0.zip
-> Downloading file:/tmp/tmphii43sg4/opensearch-observability-1.3.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission createClassLoader
* java.lang.RuntimePermission getClassLoader
* java.net.NetPermission getProxySelector
* java.net.SocketPermission * connect,resolve
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed opensearch-observability with folder name opensearch-observability
2022-03-09 02:26:05 INFO     Executing "bash /home/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f /home/opensearch-build-peterzhuamazon/builds/opensearch -o /tmp/tmphii43sg4/opensearch-1.3.0" in /tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmphii43sg4/opensearch-1.3.0
+ getopts :h:v:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-09 02:26:05 INFO     Installed plugins: ['opensearch-cross-cluster-replication', 'opensearch-observability', 'opensearch-anomaly-detection', 'opensearch-alerting', 'opensearch-index-management', 'opensearch-asynchronous-search', 'opensearch-knn', 'opensearch-security', 'opensearch-performance-analyzer', 'opensearch-job-scheduler', 'opensearch-reports-scheduler', 'opensearch-sql']
2022-03-09 02:26:05 INFO     Organize folder structure before generating rpm
2022-03-09 02:26:05 INFO     Execute rpmbuild -bb --define '_topdir /tmp/tmphii43sg4' opensearch.rpm.spec in /tmp/tmphii43sg4
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Q3vOb2
+ umask 022
+ cd /tmp/tmphii43sg4/BUILD
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.tWvXqO
+ umask 022
+ cd /tmp/tmphii43sg4/BUILD
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.s98mGA
+ umask 022
+ cd /tmp/tmphii43sg4/BUILD
+ '[' /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64 '!=' / ']'
+ rm -rf /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
++ dirname /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
+ mkdir -p /tmp/tmphii43sg4/BUILDROOT
+ mkdir /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
+ cd /tmp/tmphii43sg4
+ pwd
/tmp/tmphii43sg4
+ mkdir -p /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/var/run/opensearch
+ cp -a etc usr var /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
+ ln -s /var/lib/opensearch /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/usr/share/opensearch/data
+ ln -s /var/log/opensearch /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/usr/share/opensearch/logs
+ echo true
+ echo true
+ echo true
+ chmod -Rf a+rX,u+w,g-w,o-w /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/etc /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/usr /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64/var
+ exit 0
Processing files: opensearch-1.3.0-1.x86_64
Provides: opensearch = 1.3.0-1 opensearch(x86-64) = 1.3.0-1
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
Wrote: /tmp/tmphii43sg4/RPMS/x86_64/opensearch-1.3.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.ef1m5x
+ umask 022
+ cd /tmp/tmphii43sg4/BUILD
+ /usr/bin/rm -rf /tmp/tmphii43sg4/BUILDROOT/opensearch-1.3.0-1.x86_64
+ exit 0
2022-03-09 02:28:29 INFO     Published /home/opensearch-build-peterzhuamazon/dist/opensearch/opensearch-1.3.0-linux-x64.rpm.
2022-03-09 02:28:29 INFO     Done.

@peterzhuamazon
Copy link
Member Author

PR add rpm block in assemble workflows: #1726

1 similar comment
@peterzhuamazon
Copy link
Member Author

PR add rpm block in assemble workflows: #1726

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Mar 24, 2022

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Mar 24, 2022

@peterzhuamazon
Copy link
Member Author

OSD now support building from opensearch-build for rpm:

Logs:
$ ./assemble.sh builds/opensearch-dashboards/manifest.yml
Installing dependencies in . ...
Installing dependencies from Pipfile.lock (16e10a)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Running ./src/run_assemble.py builds/opensearch-dashboards/manifest.yml ...
2022-03-29 22:45:06 INFO     Bundling OpenSearch Dashboards (x64) on linux into <>/opensearch-build-peterzhuamazon/dist/opensearch-dashboards ...
2022-03-29 22:45:06 INFO     Copied min bundle to /tmp/tmpi4vmv5ll/opensearch-dashboards-min-1.3.0-x64.rpm.
2022-03-29 22:45:06 INFO     Start creating distribution rpm for OpenSearch-Dashboards.
2022-03-29 22:45:06 INFO     Extracting dist into /tmp/tmpi4vmv5ll.
2022-03-29 22:45:06 INFO     Convert rpm to cpio for extraction: /tmp/tmpi4vmv5ll/opensearch-dashboards-min-1.3.0-x64.rpm to /tmp/tmpi4vmv5ll/opensearch-dashboards-min-1.3.0-x64.cpio
2022-03-29 22:45:07 INFO     Extract cpio /tmp/tmpi4vmv5ll/opensearch-dashboards-min-1.3.0-x64.cpio content to /tmp/tmpi4vmv5ll
2022-03-29 22:45:09 INFO     Move /tmp/tmpi4vmv5ll/usr/share/opensearch-dashboards to /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0 for plugin installation
2022-03-29 22:45:09 INFO     Extracted dist into /tmp/tmpi4vmv5ll.
2022-03-29 22:45:09 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards/install.sh -v 1.3.0 -p linux -a x64 -d rpm -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ DISTRIBUTION=rpm
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:s:o:p:a:d:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:s:o:p:a:d:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ '[' -z rpm ']'
++ dirname <>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards/install.sh
+ DIR=<>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards
+ echo <>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards
<>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards
+ cd <>/opensearch-build-peterzhuamazon/scripts/components/OpenSearch-Dashboards
+ '[' rpm = tar ']'
+ '[' rpm = rpm ']'
+ cp ../../../config/opensearch_dashboards.yml /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/../etc/opensearch-dashboards/
+ cp -a ../../../scripts/pkg/service_templates/opensearch-dashboards/usr /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/../
+ cp -a ../../../scripts/pkg/build_templates/opensearch-dashboards/opensearch-dashboards.rpm.spec /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/../
2022-03-29 22:45:09 INFO     Recording functionalTestDashboards
2022-03-29 22:45:09 INFO     Installing queryWorkbenchDashboards
2022-03-29 22:45:09 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/queryWorkbenchDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/queryWorkbenchDashboards-1.3.0.zip
Transferring 2631850 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:09 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:09 INFO     Installing observabilityDashboards
2022-03-29 22:45:09 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/observabilityDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/observabilityDashboards-1.3.0.zip
Transferring 36259056 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:13 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:13 INFO     Installing securityDashboards
2022-03-29 22:45:13 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/securityDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/securityDashboards-1.3.0.zip
Transferring 1105820 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:14 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:14 INFO     Installing anomalyDetectionDashboards
2022-03-29 22:45:14 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/anomalyDetectionDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/anomalyDetectionDashboards-1.3.0.zip
Transferring 16680173 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:16 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:16 INFO     Installing reportsDashboards
2022-03-29 22:45:16 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/reportsDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/reportsDashboards-1.3.0.zip
Transferring 69841365 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:22 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:22 INFO     Installing ganttChartDashboards
2022-03-29 22:45:22 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/ganttChartDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/ganttChartDashboards-1.3.0.zip
Transferring 5646464 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:23 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:23 INFO     Installing indexManagementDashboards
2022-03-29 22:45:23 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/indexManagementDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/indexManagementDashboards-1.3.0.zip
Transferring 602755 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:23 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:23 INFO     Installing alertingDashboards
2022-03-29 22:45:23 INFO     Executing "/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0/bin/opensearch-dashboards-plugin --allow-root install file:/tmp/tmpi4vmv5ll/alertingDashboards-1.3.0.zip" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
Attempting to transfer from file:/tmp/tmpi4vmv5ll/alertingDashboards-1.3.0.zip
Transferring 7020130 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Plugin installation complete
2022-03-29 22:45:25 INFO     Executing "bash <>/opensearch-build-peterzhuamazon/scripts/default/install.sh -v 1.3.0 -p linux -a x64 -f <>/opensearch-build-peterzhuamazon/builds/opensearch-dashboards -o /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0" in /tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ VERSION=1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ PLATFORM=linux
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARCHITECTURE=x64
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ ARTIFACTS=
+ getopts :h:v:q:s:o:p:a:f: arg
+ case $arg in
+ OUTPUT=/tmp/tmpi4vmv5ll/opensearch-dashboards-1.3.0
+ getopts :h:v:q:s:o:p:a:f: arg
+ '[' -z 1.3.0 ']'
+ '[' -z '' ']'
+ SNAPSHOT=false
+ '[' -z linux ']'
+ '[' -z x64 ']'
+ exit 0
2022-03-29 22:45:25 INFO     Installed plugins: ['securityDashboards', 'reportsDashboards', 'alertingDashboards', 'ganttChartDashboards', 'anomalyDetectionDashboards', 'queryWorkbenchDashboards', 'observabilityDashboards', 'indexManagementDashboards']
2022-03-29 22:45:25 INFO     Organize folder structure before generating rpm
2022-03-29 22:45:25 INFO     Execute rpmbuild -bb --define '_topdir /tmp/tmpi4vmv5ll' --define '_version 1.3.0' --define '_architecture x86_64' opensearch-dashboards.rpm.spec in /tmp/tmpi4vmv5ll
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.plFP0m
+ umask 022
+ cd /tmp/tmpi4vmv5ll/BUILD
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.9vmTUi
+ umask 022
+ cd /tmp/tmpi4vmv5ll/BUILD
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.XCUdPe
+ umask 022
+ cd /tmp/tmpi4vmv5ll/BUILD
+ '[' /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64 '!=' / ']'
+ rm -rf /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
++ dirname /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
+ mkdir -p /tmp/tmpi4vmv5ll/BUILDROOT
+ mkdir /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
+ set -e
+ cd /tmp/tmpi4vmv5ll
+ pwd
/tmp/tmpi4vmv5ll
+ mkdir -p /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/var/run/opensearch-dashboards
+ mkdir -p /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/assets
+ mkdir -p /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/plugins
+ mkdir -p /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/var/log/opensearch-dashboards
+ rm -rvf etc/systemd
removed 'etc/systemd/system/opensearch-dashboards.service'
removed directory: 'etc/systemd/system'
removed directory: 'etc/systemd'
+ cp -a etc usr var /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
+ chmod 0755 /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/bin/opensearch-dashboards /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/bin/opensearch-dashboards-keystore /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin
+ ln -s /var/lib/opensearch-dashboards /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/data
+ ln -s /var/log/opensearch-dashboards /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr/share/opensearch-dashboards/logs
+ chmod -Rf a+rX,u+w,g-w,o-w /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/etc /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/usr /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64/var
+ exit 0
Processing files: opensearch-dashboards-1.3.0-1.x86_64
Provides: opensearch-dashboards = 1.3.0-1 opensearch-dashboards(x86-64) = 1.3.0-1
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
Wrote: /tmp/tmpi4vmv5ll/RPMS/x86_64/opensearch-dashboards-1.3.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.d2I1hH
+ umask 022
+ cd /tmp/tmpi4vmv5ll/BUILD
+ /usr/bin/rm -rf /tmp/tmpi4vmv5ll/BUILDROOT/opensearch-dashboards-1.3.0-1.x86_64
+ exit 0
2022-03-29 22:46:39 INFO     Published <>/opensearch-build-peterzhuamazon/dist/opensearch-dashboards/opensearch-dashboards-1.3.0-linux-x64.rpm.
2022-03-29 22:46:40 INFO     Done.

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Apr 7, 2022

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Apr 8, 2022

New issue 20220407:

In 2.0 core branch we have this change from main, and it is not backported to 1.3 branch:
opensearch-project/OpenSearch#875

In 1.3 branch, due to above change to check source condition does not exist, we are forced to add these temp fix so that 1.3.x can install plugin zips correctly:
https://github.com/opensearch-project/opensearch-build/blob/main/src/assemble_workflow/bundle_rpm.py#L66-L76
https://github.com/opensearch-project/opensearch-build/blob/main/src/assemble_workflow/bundle_rpm.py#L91-L94

In 2.0 because of this change, the above fix in 1.3.x is actually causing 2.0.x to not able to install plugins.
The if block needs to have actual code inside, and since our temp fix comment out source, it cause syntax error in if block:

2022-04-08 02:10:11 INFO     Executing "/tmp/tmpmwqeotv_/opensearch-2.0.0-alpha1/bin/opensearch-plugin install --batch file:/tmp/tmpmwqeotv_/opensearch-job-scheduler-2.0.0.0-alpha1.zip" in /tmp/tmpmwqeotv_/opensearch-2.0.0-alpha1
/tmp/tmpmwqeotv_/opensearch-2.0.0-alpha1/bin/opensearch-env: line 98: syntax error near unexpected token `fi'
Traceback (most recent call last):
  File "./src/run_assemble.py", line 58, in <module>
    sys.exit(main())
  File "./src/run_assemble.py", line 44, in main
    bundle.install_components()
  File "/var/jenkins/workspace/distribution-build-opensearch@4/src/assemble_workflow/bundle.py", line 77, in install_components
    self.install_plugin(c)
  File "/var/jenkins/workspace/distribution-build-opensearch@4/src/assemble_workflow/bundle_opensearch.py", line 22, in install_plugin
    self._execute(f"{cli_path} install --batch file:{tmp_path}")
  File "/var/jenkins/workspace/distribution-build-opensearch@4/src/assemble_workflow/bundle.py", line 106, in _execute
    subprocess.check_call(command, cwd=self.min_dist.archive_path, shell=True)
  File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/tmp/tmpmwqeotv_/opensearch-2.0.0-alpha1/bin/opensearch-plugin install --batch file:/tmp/tmpmwqeotv_/opensearch-job-scheduler-2.0.0.0-alpha1.zip' returned non-zero exit status 2.

Proposed fix:
Backport this change from 2.0 into 1.3 branch of OpenSearch core. When we release 1.3.x rpm we will be able to consume this change. And since this change is only for rpm not for tar in opensearch core, it wont affect the released tar/docker artifacts.

We can then remove the temp fix code in build repo for both 1.3.0 and 2.0.0 to success.

Thanks.

@bbarani
Copy link
Member

bbarani commented Apr 8, 2022

@dblock @CEHENKLE @saratvemulapalli Do you have any suggestions for the above issue?

@saratvemulapalli
Copy link
Member

@peterzhuamazon @bbarani I did take a look at the PR. From what I understand, it make the standard path configurable to run multiple OpenSearch instances on the same host.

I don't see any harm to have this backported to 1.3 line. As it was called out in the PR, lets make sure this is documented for 1.3 line (more specifically 1.3.2 where this change will be going into).

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Apr 8, 2022

@bbarani @tianleh @saratvemulapalli
Backport this commit to 1.3 branch, means 1.3.2 now has this change.
We have three options right now:

  1. If we still want to release 1.3.1 then we have to hardcode different options in src/assemble_workflow/bundle_rpm.py for 1.3.1 and non-1.3.1 versions. If 1.3.1, comment out source; if not, skip backup/comment.

  2. If we still want to release 1.3.1, but ok to create a temp branch such as 1.3.1-temp or 1.3.1-rpm in core repo, we can cherry pick the 1.3.1 tag and only backport this commit. We will also create a temp 1.3.1-temp or 1.3.1-rpm manifest file only for this branch. This is a one-time setup and wont happen later. We just need to remove the backup/comment code in src/assemble_workflow/bundle_rpm.py.

  3. If we are ok to release 2.0.0 first, then 1.3.2, completely ignore 1.3.1 rpm release then we can just backport the change to 1.3 core branch, and remove the backup/comment code in src/assemble_workflow/bundle_rpm.py.

Thanks.

@bbarani
Copy link
Member

bbarani commented Apr 11, 2022

@tianleh @saratvemulapalli @dblock @CEHENKLE @anasalkouz Which option do you suggest to proceed further?

@dblock
Copy link
Member

dblock commented Apr 11, 2022

I vote for (3) because there are no hacks. Generally I am against trying to do an RPM release for something that has already shipped (e.g. 1.3.1). We should only be moving forward.

@saratvemulapalli
Copy link
Member

+1 to @dblock. I like 3, as it looks clean.
In terms of the product, did we commit to release 1.3.1 RPM?

@dblock dblock changed the title [RPM M1] We should add a new block specifically to call the generation code for RPM [RPM M1] Add a new block specifically to call the generation code for RPM Apr 13, 2022
@dblock dblock changed the title [RPM M1] Add a new block specifically to call the generation code for RPM [RPM M1] Add a new block to call the generation code for RPM Apr 13, 2022
@dblock
Copy link
Member

dblock commented Apr 13, 2022

@dblock I understand that we are fixing bugs related to RPM generation here but does it warrant a new release?

Yes it does because it's not the same code.

@justchris1
Copy link

What’s the big deal to make that 1.3.2 on the same schedule and make 1.3.3 what we planned for 1.3.2?

Are you suggesting that we have a simultaneous 1.3.1 and 1.3.2 release? I guess I could see that alleviating the need for some different paths like (1) or (2), but I was assuming that was not workable per some earlier comments. I wonder what the use of 1.3.1 would be if 1.3.2 was released simultaneously. It seemed that if we did (3), we would be further punting RPM support to an indeterminate date to the right again. (Not that RPM has any determinate release after being punted from 1.0, 1.1, 1.2, and 1.3 releases - not to mention any release plan per the release notes of 1.3).

@dblock
Copy link
Member

dblock commented Apr 13, 2022

I think the question illustrates the kind of confusion we have if we release RPM 1.3.1, 1.3.1 has already been released - https://opensearch.org/docs/latest/version-history/

I don't think we should punt anything, all I am saying is that we should release 1.3.2 TAR and RPM as soon as that's ready. That's the only logical path in my brain, I don't know how to grok "1.3.1 was released March 30th, then 1.3.1 RPM is released April 15th at the same time as taxes were due except when in 2020 there was an extra 15 days grace period" :)

@justchris1
Copy link

I think the question illustrates the kind of confusion we have if we release RPM 1.3.1, 1.3.1 has already been released - https://opensearch.org/docs/latest/version-history/

Oh, I see. I can't use this project until there is real support from RPMs so I didn't even notice the 1.3.1 release.

I don't think we should punt anything, all I am saying is that we should release 1.3.2 TAR and RPM as soon as that's ready.

Yeah, I guess I can't argue with 'as soon as that's ready' except to note that the community desperately needs this feature, it is the largest missing element/feature that never made it over from Elasticsearch, and it is long promised but seems to be continuously deprioritized. As Kyle stated in the forums in November 2021 "RPM and DEB are super vital to serious use for a lot of folks", which I agree completely.

@CEHENKLE
Copy link
Member

So just to frame the question here. There are three dimensions we can optimize against:

  1. RPM is a critical project. The absence of RPM causes real pain. So we want to get it out as soon as possible.
  2. We don't want to slam a hack into production that will cause us more pain down the line.
  3. We firmly believe in progress, not perfection. If there's something that solves our needs, but could be better, let's get it out and improve it.

Reading the comments, @dblock it seems like you think the second option (a temp branch) violates number 2 above so much that it outweighs the benefits to 1 and 3. Other voices (mine included) seem to think the second option balances the three concerns the best. Do you have another option that we haven't considered that balances the three concerns better? Or do you still think waiting for 1.3.2 (which optimizes for 2, but is less effective on 1 and 3) is the best option?

@CEHENKLE
Copy link
Member

(and just a side note: Making 1.3.1 available means making the current version of the 1.x line available in RPM, rather than "re-releasing". Will they always be available on the same day going forward when we release? yes. Should we wait to make that true starting now? I don't think so, but that's how my brain squares that circle, dB).

@stockholmux
Copy link
Member

Just catching up here.

Making a 1.3.2 because it has RPM is violation of semver as you're treating it like a feature. If you don't rev the version, then it's not a feature, just like if we added a new build to support RISC-V or something. Patches can only fix bugs - this isn't a bug.

@CEHENKLE
Copy link
Member

Hey folks. -- I've slept on it, and we'll make the first RPM 2.0-RC1, and then follow up with a release on 1.3.2. I hate the delay viscerally, but I can't justify the hackery/extra churn on the EE team for the time saved.

Thanks.
/C

@justchris1
Copy link

Hey folks. -- I've slept on it, and we'll make the first RPM 2.0-RC1, and then follow up with a release on 1.3.2. I hate the delay viscerally, but I can't justify the hackery/extra churn on the EE team for the time saved.

Thanks. /C

Don't worry. No one will be too surprised.

@dblock
Copy link
Member

dblock commented Apr 14, 2022

Just catching up here.

Making a 1.3.2 because it has RPM is violation of semver as you're treating it like a feature. If you don't rev the version, then it's not a feature, just like if we added a new build to support RISC-V or something. Patches can only fix bugs - this isn't a bug.

So should we do a 1.4.0 then? I don't mean to throw us in a loop, ... but.

Isn't adding RPM in 1.3.1 the same problem as in 1.3.2? So should it be 1.4.0?

@setiah
Copy link
Contributor

setiah commented Apr 15, 2022

Two backports:

Remove Hacks:

Looks like we finally backported the PR that was the source of contention to 1.3. Does this imply the plan is to release 1.3.1 version rpm along with the 2.0.0 rc1 rpm?

@peterzhuamazon
Copy link
Member Author

peterzhuamazon commented Apr 15, 2022

Hi @setiah option 3 is what we are going with:
#1545 (comment)

Thanks.

@stockholmux
Copy link
Member

@dblock So, IIRC, the original intention of having the distributions tracked away from numbered versions in the roadmap is that they would not have an effect on the actual logic/features of OpenSearch and could be released out of phase with any particular version. That's fine. No problem with SemVer. Use build metadata that is outside the scope of major.minor.patch.

As you're suggesting revving the patch to accommodate this fix doesn't fit the word nor the spirit of SemVer (PATCH version when you make backwards compatible bug fixes ... not this situation at all). Revving the minor doesn't really fit either (MINOR version when you add functionality in a backwards compatible manner ... not really either). I'm suggesting that the project use the build metadata appropriately as per spec. For someone who doesn't care about RPM this version is meaningless. Organizations have policies they have to follow as far as adopting the latest patch, so this is creating waste heat for those users.

I'm uncomfortable with the idea of bringing builds back into the numbered versioning scheme yet tracking them in a different place - it's really violating the trust users have in our roadmap and our versioning. All the (rightful) hubbub about RPM being in 1.3.0 roadmap is also meaningless since it was made clear that the distributions shouldn't have been in the numbered version roadmap, and now the project is attaching RPM to a patch version?

Thoughts @elfisher @CEHENKLE ?

@dblock
Copy link
Member

dblock commented Apr 15, 2022

Oh, I see. I think 1.3.2 should also get some low hanging CVEs.

@setiah
Copy link
Contributor

setiah commented Apr 15, 2022

@dblock So, IIRC, the original intention of having the distributions tracked away from numbered versions in the roadmap is that they would not have an effect on the actual logic/features of OpenSearch and could be released out of phase with any particular version. That's fine. No problem with SemVer. Use build metadata that is outside the scope of major.minor.patch.

As you're suggesting revving the patch to accommodate this fix doesn't fit the word nor the spirit of SemVer (PATCH version when you make backwards compatible bug fixes ... not this situation at all). Revving the minor doesn't really fit either (MINOR version when you add functionality in a backwards compatible manner ... not really either). I'm suggesting that the project use the build metadata appropriately as per spec. For someone who doesn't care about RPM this version is meaningless. Organizations have policies they have to follow as far as adopting the latest patch, so this is creating waste heat for those users.

I'm uncomfortable with the idea of bringing builds back into the numbered versioning scheme yet tracking them in a different place - it's really violating the trust users have in our roadmap and our versioning. All the (rightful) hubbub about RPM being in 1.3.0 roadmap is also meaningless since it was made clear that the distributions shouldn't have been in the numbered version roadmap, and now the project is attaching RPM to a patch version?

Thoughts @elfisher @CEHENKLE ?

+1, I agree the distribution release process should remain independent of the version release process. This helps with not just the RPM but other distributions such as Windows, Debian as well in future. Else, we could be falling prey to such issues down the line again while releasing other distributions.

@dblock
Copy link
Member

dblock commented Apr 15, 2022

@setiah except it's not separate in practice, the rpm process is implemented in a tightly coupled way to the tar release process

@peterzhuamazon
Copy link
Member Author

Python code can now generate RPMs for both OS and OSD on every version pass 1.3.0.

@peterzhuamazon
Copy link
Member Author

20220429: Remove PA not properly stopped before install/uninstall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests