Skip to content

Instantly share code, notes, and snippets.

@johnpmitsch
Last active August 30, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpmitsch/d792ba46d4169744eb3f02114490d321 to your computer and use it in GitHub Desktop.
Save johnpmitsch/d792ba46d4169744eb3f02114490d321 to your computer and use it in GitHub Desktop.
centos container setup katello circleci
# Run container
docker run -u 0 -e RAILS_ENV=production -p 8080:8080 -it centos/ruby-25-centos7 /bin/bash
# clone repos
cd ~ && git clone https://github.com/theforeman/foreman.git
cd ~ && git clone https://github.com/Katello/katello.git
echo "gemspec :path => '../katello', :development_group => 'katello_dev', :name => 'katello'" >> ~/foreman/bundler.d/katello.rb
# install system dependencies and gems
rpm -i https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y libvirt-devel systemd-devel rubygem-qpid_messaging qpid-cpp-client-devel
cd ~/foreman && bundle install
# Remove SCL nodejs
yum remove rh-nodejs10*
rm -rf /opt/rh/rh-nodejs10
# Install nodejs provided by centos, same as we use in katello development
yum install nodejs
# Re-alias node and npm to the installed version
alias node="/usr/bin/node"
alias npm="/usr/bin/npm"
# install node packages
cd ~/foreman/ && npm i
# setup database
# figuring this out
# start server
bundle exec foreman start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment