Closed PaulNeumann closed 3 years ago
Seems to be a good idea to me -- I'll let the DB folks decide on that, but from a pure scripting standpoint I would:
oracle-database-xe-18c-1.0-1.x86_64.rpm
in a variable to ease maintenance${KEEP_DB_INSTALLER,,}
to force lowercase conversion@AmedeeBulle Thank you. If this moves forward, I'll incorporate your suggestions.
Hey @PaulNeumann, you know when they say "great minds think alike" :)
I should have checked before but I too just realized the same issue with the click-through XE and got eager to do "that quick fix". However, I adopted a slightly different approach of just looking for the file locally before reaching out to the web in the install.sh script.
Basically, if you (the user) provide the RPM, we will install the RPM otherwise, we will install it from the web. That way a user may never have to go through an additional download again. Also keeps the config simpler IMO, what do you think?
Also curious about your opinion, @AmedeeBulle
@gvenzl :-) Sure, that works, and it does keep the configuration simpler. I think I'd still lean toward saving the installer to /vagrant
and installing from there, though. That way the script does all the work. The user never has to download the installer manually and the download happens only once.
How about we combine the two? 1) Look for the local file 1.1) if it's there install it 1.2) if not download it and if the variable is set keep the file. That way we get everything one could want.
@gvenzl I apologize if I'm misunderstanding, but that sounds similar to my initial suggestion. Having a "keep the file" Boolean does complicate the configuration (although users wouldn't have to do anything with it unless they wanted to). If the goal is to keep the configuration as simple as possible, then something like the following might work:
# Install Oracle
# If local file doesn't exist, download it
install_file='oracle-database-xe-18c-1.0-1.x86_64.rpm'
if [[ ! -f /vagrant/"${install_file}" ]]; then
echo 'INSTALLER: Downloading Oracle Database software'
wget -q -P /vagrant \
https://download.oracle.com/otn-pub/otn_software/db-express/"${install_file}"
fi
yum -y localinstall /vagrant/"${install_file}"
There would be no manual download, and the download would happen only once.
Hey @PaulNeumann, no I think you understand correctly and I'm the one who was confused yesterday, sorry about that! I didn't see that you were also already checking whether the file exists or not. The top one is fine with me, there is a legitimate use case to give the user the choice whether the install file should be preserved or not.
@gvenzl Got it. Thanks! I'll work on this as soon as I can.
The ability to install Oracle Database 18c XE without having to click through the license agreement is terrific. However, installing directly from OTN means that the installer rpm is downloaded each time the VM is built. The rpm is 2.3 GB, so this can be problematic for people with slow or metered connections.
It might be helpful to add an option to save the installer rpm. This could be added as a Boolean in
.env
and theVagrantfile
, with the value passed toinstall.sh
as an environment variable. The download/install part ofinstall.sh
might look something like:To avoid changing the current behavior of the project, it probably makes sense for KEEP_DB_INSTALLER to default to false.
If you think that this is a good idea, I'd be happy to work on it.