Where is the Artifactory config file located after installing with RPM? - artifactory

After installing Artifactory using the RPM installer, where is the Artifactory XML configuration file stored? (The one you can see through the UI at "Admin > Advanced > Config Descriptor")
Have been looking around in "/opt/jfrog/artifactory" and "/etc/opt/jfrog/artifactory" - but havent been able to locate this specific file.
Thanks in advance!

I haven't used the RPM installer, but I've used the Debian installer and the Docker image, and I'd imagine they all put it in the same place:
/var/opt/jfrog/artifactory/etc/artifactory.config.latest.xml
It should also be accessible by symbolic link from:
/opt/jfrog/artifactory/etc/artifactory.config.latest.xml
Other files in that directory in the form of artifactory.config.latest.[numbers].xml are backups or older edits of this file.

Related

Artifactory: Converting remote repo to local repo

My employer has been misusing Bintray as our binary repository for some time. We are finally moving to Artifactory instead and closing down Bintray. But this seems to be an almost impossible task. There is no way of exporting Bintray repos to a zip. Downloading the repos means manually downloading each file from the UI or through their API. I have tried two approaches for automation:
1) wget for crawling our bintray like this:
wget -e robots=off -o ~/wget.log -w 1 -m -np --user --password "https://.bintray.com"
which yielded all of the files in the repos. But this only solves half the problem. I couldn't find out how to import the files to a repository in artifactory (all the repos are over 100mbs each and therefore can't be uploaded, for some reason).
2) I set the Bintray repos up as remote repositories and enabled Active Replication. That seems to have worked for now. But I don't know if they will be removed when the Bintray account is moved or even if they are stored in Artifactory. Therefore I would like to convert the remote repo to a local repo, to make sure that it is permanently stored in artifactory is there a way of doing this? If so, how?
I'll try to address both of your questions below.
What do you mean you can't upload more than 100mb? Which version of Artifactory are you using? On-prem or SaaS-based installation? How are you trying to upload your files to Artifactory? Have you tried to import the content by using the import feature of Artifactory? (Admin --> Import&Export --> repository Import)
It sounds like you are using the UI for the upload, and if so you can configure the max upload size in Admin --> General Configuration page.
If you mean that you have all of the content from Bintray cached in your remote repository cache in Artifactory just use the "Copy" or "Move" option and move the content to a local repository. This will ensure that all of the content is stored locally.

ignore dev dependencies in php composer

I have developed a composer laravel based project that I need to install on a remote production server. The problem is I have limited permission/ access so my option is to "archive" the package( using composer archive) and unpack on the production.
What folders do I need to archive and how can I ignore the dev dependencies of the package as well as vendor dev dependencies?
composer archive is likely not to help you, because this command creates an archive of a defined version of a package.
You probably want to upload the whole working application, and not only one package. You should create a little script that will create the archive file for you, which should do:
checkout the application from the repository in a new directory
run composer install --no-dev to install all required dependencies without dev-dependencies
optionally delete files that are not necessary on the server, like documentation, the .git folder, and other stuff
create the archive file from all these files
optionally upload that archive to the target server and unarchive there
optionally check basic functions and switch to the new uploaded version on the server

Nexus3 OSS: Installing Multiple Instances on Windows

This is actually an informational post to show some undocumented abilities of the windows nexus.exe. If anyone wants to provide some other useful information about Nexus3 OSS installation and/or configuration on Windows that is not readily available in the online books/documentation, that would be great!
I needed to install Nexus3 along side our current Nexus2.x to take advantage of the new repository formats, but Nexus2.x is already running under the default service name of "nexus". How can I provide the service name that Nexus3 will run under on Windows?
Nexus 3 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM3
The documentation now includes instructions to clarify how to install multiple instances for Nexus 3:
https://help.sonatype.com/display/NXRM3/Installation#Installation-RunningasaServiceonWindows
Nexus 2 Documentation as of 2017/09/12
https://help.sonatype.com/display/NXRM2/Repository+Manager+2
In order to install Nexus3 under a different service name on windows, you will need to use the archive(zip file) download for windows instead of the windows executable installer. Then you simply provide the name you want the service to have as the last parameter of the normal install command.
More specific instructions:
Unpack the zip file into the desired location.
Open a command prompt with elevated permissions (run as administrator) and navigate to the bin directory of the unpacked nexus3 folder.
To create the service:
nexus.exe /install YourUniqueServiceName
To remove the service:
nexus.exe /uninstall YourUniqueServiceName
Note: Creating/Removing the service this way will not delete the nexus installation nor data files; they only affect the windows service. Conversely the windows installer provides an uninstaller executable that will delete the installation files and optionally will also delete the data directory.
Here is some other useful configuration options for changing the port and the data directory location, which you will want to do when installing multiple instances (as in the use case above). Be sure to stop the service if you've already installed it.
To change the port:
Navigate to the "etc" directory under the nexus installation location, and open the "org.sonatype.nexus.cfg" configuration properties file.
Change the "application-port" property to the desired port value.
To change the Data Directory and/or the java.io temporary directory:
Add or modify the following commandline arguments to the "nexus.vmoptions" file in the bin directory:
-Dkaraf.data=InsertDesiredDataDirectoryHere
-Djava.io.tmpdir=InsertDesiredTmpDirectoryHere

WampServer, client header and library files

WampServer is installed on my computer.
I am wishing to install the RMySQL package.
The online documentation of the latter mentions:
Install a MySQL client library from http://www.mysql.com or http://dev.mysql.com. If you already installed a MySQL server, you may want to re-run the install to ensure that you also installed client header and library files. Note that Xampp doesn't include these.
I am confused I don't know which are these required 'header' and 'library' files. And, how do I know whether they are made available by WampServer? If it is not the case, can I simply add them somewhere to a WampServer folder (instead of uninstalling WampServer and installing Apache and its friends separatedly)?
Thanks,
Édouard
OK so I've just gone through the living hell that is installing RMySQL on Windows. But finally succeeded.
Binaries on windows are not supported, so the other answers saying this is "Simple" are wrong. Also a lot of the guides etc out there are outdated, or have broken links.
The best overall answer for MYSQL generally is to look at:
Using MySQL in R for Windows
Basically you have to install RTools in order to be able to compile the packages from source.
However specifically with WAMPServer, it doesn't install the .lib and client files. So what I did was go to MYSQL to find the exact same version of MYSQL as Wampserver had installed. I downloaded the zip file version. I compared the lib directories with a visual difference tool (Beyond Compare) and copied across the missing files into my WAMPServer MYSQL installation.
As per the guide above, I then copied:
libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
libmysql.dll to C:\Program Files\R\R-2.12.1\bin
Finally install.packages('RMySQL',type='source') worked
For people using WampServer in Windows and wanting to install RMySQL, I've adapted the instructions outlined here. I'm assuming you already have WampServer installed. I'll also use the file paths that I used on my computer, but keep in mind that your file paths may differ slightly (due to different versions, installations, etc.)
Install latest RTools from here.
Create a new file called Renviron.site in C:\Program Files\R\R-2.15.1\etc\, open the file in a text editor, and add a line like MYSQL_HOME="C:/wamp/bin/mysql/mysql5.6.12" (path to your mysql files). Make sure to use forward slashes and don't forget the quotes.
Click on your WampServer icon and go to MySQL, then Version. This will tell you what version of MySQL was included in your WampServer distribution.
Go to http://dev.mysql.com/downloads/mysql and download and install the same version of MySQL that is included in your WampServer distribution.
Once you've gone through the complete installation, go to the folder where MySQL installed and copy the file called libmysql.lib, which can be found in the lib\ folder.
Now go to the lib\ folder in your WampServer directory (mine is C:\wamp\bin\mysql\mysql5.6.12\lib) and create a new folder called opt\.
Paste into this new opt folder the libmysql.lib file that you just copied.
You can now uninstall the MySQL server that you just downloaded, since we only needed that one file from it (which is apparently not included in the WampServer distribution).
Under C:\wamp\bin\mysql\mysql5.6.12\lib\, you'll also find libmysql.dll. Copy this to C:\Program Files\R\R-2.15.1\bin\i386\ (This works if you have 36 bit Windows like me. I think if you have 64 bit, you may just put it under the bin\ subdirectory instead of under bin\i386\, but please don't hold me to that.) I also copied the same file (libmysql.dll) to the C:\windows\system32\ directory, but I'm not sure if this is necessary.
In R, run install.packages('RMySQL',type='source') and hopefully the installation completes without any issues. You can then load the package as usual with library(RMySQL).
Note: I'm running 32 bit Windows, R-2.15.1, and a WampServer distribution that includes MySQL 5.6.12.

Py2app does not include the Sqlite driver- "Database error: Driver not loaded Driver not loaded"

I am having the same issue described in this post on the py2app mailing list.
I have a python application that uses a sqlite database. On my machine, which has all the dependencies installed, there are no issues. However, when I bundle the application with py2app, clicking a menu that causes the database to be accessed results in this error:
Database error: Driver not loaded Driver not loaded
For the Windows installer, the files in \Qt\version\plugins\sqldrivers\*.* can be copied to \myApp\sqldrivers\*
The same files on the Mac can be found in /opt/local/share/qt4/plugins/sqldrivers (installed via Macports).
However, copying the sqldrivers directory to my application's Resources or Frameworks directories still results in the same error.
How can I add sqlite support into my application that is built using py2app?
Turns out the pyside recipe does have a way to specify which qt-plugins you need...
options=dict(py2app={
'argv_emulation': True,
'qt_plugins' : "sqldrivers",
}
),
This puts all the sqldrivers into the right directory and setups qt.conf correctly.
have you tried what he said
in this post ?
py2app setup.py usage question
it mentioned
you need to include the sqlalchemy.dialects.sqlite as a package
I managed to get this to work as follows:
After building with py2app, inside the application's Contents directory, make a new plugins directory.
Then copy sqldrivers/libqsqlite.dylib into this plugins directory.
Afterwards, install_name_tool has to be used to change the library links in libqsqlite.dylib to point to the Qt libraries in the application's Frameworks directory rather than the system Qt libraries.

Resources