Conan: Difference between revisions
Jump to navigation
Jump to search
(23 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
|} | |} | ||
<source lang="bash"> | <source lang="bash"> | ||
docker run -- | docker run -it --rm \ | ||
--publish 9040:8081 \ | --publish 9040:8081 \ | ||
--publish 9041:8082 \ | --publish 9041:8082 \ | ||
-- | docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3 \ | ||
- | bin/bash | ||
id; exit | |||
</source> | |||
<source lang="bash"> | |||
mkdir -p $JFROG_HOME/conan7/var/etc/ | |||
touch $JFROG_HOME/conan7/var/etc/system.yaml | |||
chown -R 1030:1030 $JFROG_HOME/conan7/var | |||
</source> | </source> | ||
==Docker== | ==Docker== | ||
===Debian=== | ===Debian=== | ||
<source lang="bash"> | <source lang="bash" highlight="5,6"> | ||
docker run --detach \ | docker run --detach \ | ||
--publish 9040:8081 \ | --publish 9040:8081 \ | ||
Line 32: | Line 38: | ||
--restart always \ | --restart always \ | ||
--volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory \ | --volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory \ | ||
docker.bintray.io/jfrog/artifactory- | docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3 | ||
</source> | </source> | ||
===CentOS=== | ===CentOS=== | ||
<source lang="bash"> | <source lang="bash" highlight="5,6"> | ||
docker run --detach \ | docker run --detach \ | ||
--publish 9040:8081 \ | --publish 9040:8081 \ | ||
Line 43: | Line 49: | ||
--restart always \ | --restart always \ | ||
--volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory:Z \ | --volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory:Z \ | ||
docker.bintray.io/jfrog/artifactory- | docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3 | ||
</source> | </source> | ||
Line 96: | Line 102: | ||
docker start conan | docker start conan | ||
docker stop conan | docker stop conan | ||
docker logs conan | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 124: | Line 131: | ||
conan install .. | conan install .. | ||
cmake --build . --config Release | cmake --build . --config Release | ||
</source> | |||
== Debian == | |||
<source lang="bash"> | |||
cat <<EOF >> /etc/apt/sources.list.d/jfrog-artifactory.list | |||
deb https://releases.jfrog.io/artifactory/artifactory-debs buster main | |||
# deb https://releases.jfrog.io/artifactory/artifactory-debs bionic main | |||
# deb https://releases.jfrog.io/artifactory/artifactory-debs xenial main | |||
EOF | |||
wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public|apt-key add - | |||
apt update;apt list --upgradable;apt search jfrog-artifactory-cpp-ce | |||
</source> | |||
<source lang="properties"> | |||
cat <<EOF >> $JFROG_HOME/artifactory/var/etc/system.yaml | |||
configVersion: 1 | |||
shared: | |||
extraJavaOpts: "-server -Xms512m -Xmx1g -Xss256k -XX:+UseG1GC" | |||
node: | |||
primary: true | |||
database: | |||
type: postgresql | |||
driver: org.postgresql.Driver | |||
url: jdbc:postgresql://localhost:5432/artifactory | |||
username: artifactory | |||
password: password | |||
EOF | |||
</source> | |||
<source lang="bash"> | |||
# pios swap memory | |||
printf '\nbefore:\n';free -th;\ | |||
sed -i "s|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|" /etc/dphys-swapfile;\ | |||
service dphys-swapfile restart;\ | |||
printf '\nupdate:\n';free -th | |||
</source> | |||
== Raspbian == | |||
<code>nano ~/.bashrc</code> | |||
<source lang="bash" start="16" Highlight="5" line> | |||
# alias rm='rm -i' | |||
# alias cp='cp -i' | |||
# alias mv='mv -i' | |||
export JFROG_HOME=/opt/jfrog | |||
</source> | |||
<source lang="bash"> | |||
export JFROG_HOME=/opt/jfrog; cd $JFROG_HOME | |||
wget https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-cpp-ce-6.23.3.zip -O artifactory.zip | |||
unzip artifactory.zip; mv artifactory-cpp-ce-6.23.3 artifactory; rm -rf artifactory.zip | |||
wget https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-cpp-ce-6.12.2.zip -O artifactory.zip | |||
unzip artifactory.zip; mv artifactory-cpp-ce-6.12.2 artifactory; rm -rf artifactory.zip | |||
</source> | |||
<code>nano $JFROG_HOME/artifactory/bin/artifactory.default</code> | |||
<source lang="bash" start="12" Highlight="4,5" line> | |||
export TOMCAT_HOME=$ARTIFACTORY_HOME/tomcat | |||
export ARTIFACTORY_PID=$ARTIFACTORY_HOME/run/artifactory.pid | |||
export JAVA_OPTIONS="-server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\"" | |||
#export JAVA_OPTIONS="-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\"" | |||
export JAVA_OPTIONS="$JAVA_OPTIONS -Djruby.compile.invokedynamic=false -Dfile.encoding=UTF8 -Dartdist=zip -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/./urandom" | |||
</source> | |||
<source lang="bash"> | |||
$JFROG_HOME/artifactory/bin/installService.sh | |||
# init 6 | |||
systemctl daemon-reload | |||
systemctl start artifactory | |||
systemctl status artifactory | |||
tail -f $JFROG_HOME/artifactory/logs/catalina/catalina.out | |||
systemctl disable artifactory | |||
systemctl enable artifactory | |||
</source> | |||
<code>nano $JFROG_HOME/artifactory/tomcat/conf/server.xml</code> | |||
<source lang="xml" start="20" Highlight="2" line> | |||
<Service name="Catalina"> | |||
<Connector port="8081" sendReasonPhrase="true" relaxedPathChars='[]' relaxedQueryChars='[]' maxThreads="200"/> | |||
</source> | </source> | ||
== Knowledge == | == Knowledge == | ||
< | <source lang="bash"> | ||
# filter and remove docker images, containers | # filter and remove docker images, containers | ||
docker rm $(docker ps --all -q -f status=dead) | docker rm $(docker ps --all -q -f status=dead) | ||
Line 138: | Line 228: | ||
docker exec -it conan bash | docker exec -it conan bash | ||
service --status-all | service --status-all | ||
</ | </source> | ||
==References== | ==References== | ||
Line 153: | Line 243: | ||
* [https://github.com/memsharded/hello Conan Hello World] | * [https://github.com/memsharded/hello Conan Hello World] | ||
* [https://conan.io/downloads.html Downloads] | * [https://conan.io/downloads.html Downloads] | ||
| valign="top" | | |||
* [https://medium.com/@hoan.nguyen.it/how-did-g1gc-tuning-flags-affect-our-back-end-web-app-c121d38dfe56 Affected Performance of First Garbage Collector (G1GC)] | |||
* [https://www.jfrog.com/confluence/display/RTF6X/Configuring+the+Database Installing JFrog Artifactory 6.23 Configuring the DB] | |||
* [https://www.jfrog.com/confluence/display/RTF6X/Installing+on+Windows Installing JFrog Artifactory 6.23 on Windows 10] | |||
* [https://bintray.com/jfrog/product/JFrog-Artifactory-Cpp-CE/view Downloads JFrog Artifactory 6.23 for C/C++] | |||
* [https://raspberrypi.stackexchange.com/questions/113061/ Artifactory Installation on Raspberry Pi 4] | |||
* [https://docs.conan.io/en/latest/uploading_packages/artifactory_ce.html#creating-and-using-a-conan-repo Creating and Using a Conan Repo] | |||
* [https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API?utm_source=platform&utm_content=RTF Artifactory REST API] | |||
* [https://www.jfrog.com/confluence/display/JFROG/Installing+Artifactory Installing Artifactory] | |||
* [[Conan Client]] | |||
| valign="top" | | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
* [[CocoaPods]] | |||
* [[Maven]] | |||
* [[Bazel]] | |||
* [[NPM]] | |||
* [[Ant]] | |||
* [[Ivy]] | |||
| valign="top" | | |||
| valign="top" | | | valign="top" | | ||
|} | |} |
Latest revision as of 20:57, 18 January 2024
Linux: export JFROG_HOME=/srv/jfrog |
MacOS: export JFROG_HOME=$HOME/jfrog |
Local location | Container location | Usage |
---|---|---|
$JFROG_HOME/conan7/var/ |
/var/opt/jfrog/artifactory |
Application Data |
docker run -it --rm \
--publish 9040:8081 \
--publish 9041:8082 \
docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3 \
bin/bash
id; exit
mkdir -p $JFROG_HOME/conan7/var/etc/
touch $JFROG_HOME/conan7/var/etc/system.yaml
chown -R 1030:1030 $JFROG_HOME/conan7/var
Docker
Debian
docker run --detach \
--publish 9040:8081 \
--publish 9041:8082 \
--name conan \
--restart always \
--volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory \
docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3
CentOS
docker run --detach \
--publish 9040:8081 \
--publish 9041:8082 \
--name conan \
--restart always \
--volume $JFROG_HOME/conan7/var/:/var/opt/jfrog/artifactory:Z \
docker.bintray.io/jfrog/artifactory-cpp-ce:7.6.3
Apache
Debian
vim /etc/apache2/sites-enabled/01-cid.chorke.org-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLProxyEngine On
ProxyRequests Off
SSLProxyVerify None
ProxyPreserveHost On
AllowEncodedSlashes On
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
SSLProxyCheckPeerExpire Off
# more others config skipped
<Location /ui>
Order Allow,Deny
Allow from all
ProxyPass http://localhost:9041/ui nocanon
ProxyPassReverse http://localhost:9041/ui
</Location>
<Location /artifactory>
Order Allow,Deny
Allow from all
ProxyPass http://localhost:9040/artifactory nocanon
ProxyPassReverse http://localhost:9040/artifactory
</Location>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/cid.chorke.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cid.chorke.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/cid.chorke.org/chain.pem
</VirtualHost>
</IfModule>
apachectl -t
systemctl reload httpd
systemctl restart httpd
# http://cid.chorke.org/artifactory/webapp/#/login@admin/password
To Run
docker exec -it conan bash
docker start conan
docker stop conan
docker logs conan
To Do
yay -S conan
pip install conan
brew install conan
mkdir build; cd build
conan install ..
conan info ..
conan search ..
conan search zlib/1.2.8@lasote/stable
conan .. -G "Visual Studio 14 Win64"
conan new academia/1.0.0 -t
conan remote add chorke https://cid.chorke.org/artifactory/api/conan/conan-local
conan upload academia/1.0.0@diego/testing -r=chorke --all
conan remove "*" -f
conan search
cmake --build . --config Release
conan install ..
cmake --build . --config Release
Debian
cat <<EOF >> /etc/apt/sources.list.d/jfrog-artifactory.list
deb https://releases.jfrog.io/artifactory/artifactory-debs buster main
# deb https://releases.jfrog.io/artifactory/artifactory-debs bionic main
# deb https://releases.jfrog.io/artifactory/artifactory-debs xenial main
EOF
wget -qO - https://releases.jfrog.io/artifactory/api/gpg/key/public|apt-key add -
apt update;apt list --upgradable;apt search jfrog-artifactory-cpp-ce
cat <<EOF >> $JFROG_HOME/artifactory/var/etc/system.yaml
configVersion: 1
shared:
extraJavaOpts: "-server -Xms512m -Xmx1g -Xss256k -XX:+UseG1GC"
node:
primary: true
database:
type: postgresql
driver: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/artifactory
username: artifactory
password: password
EOF
# pios swap memory
printf '\nbefore:\n';free -th;\
sed -i "s|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|" /etc/dphys-swapfile;\
service dphys-swapfile restart;\
printf '\nupdate:\n';free -th
Raspbian
nano ~/.bashrc
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
export JFROG_HOME=/opt/jfrog
export JFROG_HOME=/opt/jfrog; cd $JFROG_HOME
wget https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-cpp-ce-6.23.3.zip -O artifactory.zip
unzip artifactory.zip; mv artifactory-cpp-ce-6.23.3 artifactory; rm -rf artifactory.zip
wget https://bintray.com/artifact/download/jfrog/artifactory/jfrog-artifactory-cpp-ce-6.12.2.zip -O artifactory.zip
unzip artifactory.zip; mv artifactory-cpp-ce-6.12.2 artifactory; rm -rf artifactory.zip
nano $JFROG_HOME/artifactory/bin/artifactory.default
export TOMCAT_HOME=$ARTIFACTORY_HOME/tomcat
export ARTIFACTORY_PID=$ARTIFACTORY_HOME/run/artifactory.pid
export JAVA_OPTIONS="-server -Xms512m -Xmx2g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\""
#export JAVA_OPTIONS="-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\""
export JAVA_OPTIONS="$JAVA_OPTIONS -Djruby.compile.invokedynamic=false -Dfile.encoding=UTF8 -Dartdist=zip -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Djava.security.egd=file:/dev/./urandom"
$JFROG_HOME/artifactory/bin/installService.sh
# init 6
systemctl daemon-reload
systemctl start artifactory
systemctl status artifactory
tail -f $JFROG_HOME/artifactory/logs/catalina/catalina.out
systemctl disable artifactory
systemctl enable artifactory
nano $JFROG_HOME/artifactory/tomcat/conf/server.xml
<Service name="Catalina">
<Connector port="8081" sendReasonPhrase="true" relaxedPathChars='[]' relaxedQueryChars='[]' maxThreads="200"/>
Knowledge
# filter and remove docker images, containers
docker rm $(docker ps --all -q -f status=dead)
docker rmi $(docker images -qa -f 'dangling=true')
docker rm artifactory && docker rmi docker.bintray.io/jfrog/artifactory-oss:4.1.0
# docker container debug, checking history & service
docker run --name='artifactory' -it docker.bintray.io/jfrog/artifactory-oss:4.1.0
docker history docker.bintray.io/jfrog/artifactory-oss:4.1.0
docker exec -it conan bash
service --status-all