-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update documentation on how to manually install HDM. #40
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# Manual install | ||
|
||
## General | ||
|
||
HDM binds per default to port 3000. | ||
|
||
## Ruby | ||
|
||
Make sure you have the necessary ruby version on your system avaiable. You might use rvm or rbenv. | ||
rwaffen marked this conversation as resolved.
Show resolved
Hide resolved
|
||
The needed version cann be found here: [.ruby-version](.ruby-version). | ||
|
||
## CentOS 8 Streams | ||
|
||
### **RVM** | ||
|
||
As root do: | ||
|
||
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - | ||
command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - | ||
curl -sSL https://get.rvm.io | bash -s stable | ||
|
||
source /etc/profile.d/rvm.sh | ||
|
||
rvm install 2.5.9 | ||
rvm use 2.5.9 | ||
gem install bundler | ||
|
||
### **yarn/nodejs** | ||
|
||
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo | ||
curl --silent --location https://rpm.nodesource.com/setup_14.x | bash | ||
yum install -y yarn | ||
|
||
### **Main part** | ||
|
||
yum install -y git vim | ||
cd /opt | ||
git clone https://github.com/betadots/hdm.git | ||
cd /opt/hdm | ||
bundle config set --local path 'vendor/bundle' | ||
bundle config set --local with 'development' | ||
bundle install | ||
yarn install --check-files | ||
|
||
### **Configure hdm** | ||
|
||
cp /opt/hdm/config/hdm.yml.template /opt/hdm/config/hdm.yml | ||
# vim /opt/hdm/config/hdm.yml # adopt config | ||
bundle exec rails db:setup | ||
echo "secret" | EDITOR="vim" bundle exec rails credentials:edit | ||
bundle exec rails server -b 0.0.0.0 & # or use systemd unit from `config` folder. | ||
|
||
### **systemd** | ||
|
||
cp /opt/hdm/config/hdm.service /etc/systemd/system/hdm.service | ||
systemctl daemon-reload | ||
systemctl start hdm.service | ||
systemctl status hdm.service | ||
|
||
## CentOS 7 | ||
|
||
You will need sqlite >= 3.8.x | ||
|
||
yum install -y https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-3.8.11-1.fc21.x86_64.rpm | ||
yum install -y https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-devel-3.8.11-1.fc21.x86_64.rpm | ||
|
||
After doing this, follow the CentOS 8 Streams instructions. | ||
|
||
## MacOS (for development) | ||
|
||
### **RVM** | ||
|
||
gpg --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB | ||
curl -sSL https://get.rvm.io | bash -s stable | ||
|
||
# reload shell | ||
|
||
In case you are using an Apple M1 Chip you might run into trouble building | ||
Ruby. A work around for that is using the command | ||
|
||
rvm install 2.5.9 --with-cflags="-Wno-error=implicit-function-declaration" | ||
|
||
On intel you can proceed with the following: | ||
|
||
rvm install 2.5.9 | ||
rvm use 2.5.9 | ||
gem install bundler | ||
|
||
### **yarn/nodejs** | ||
|
||
brew install node@14 | ||
npm install -g yarn | ||
|
||
### **Main part** | ||
|
||
git clone https://github.com/betadots/hdm.git | ||
cd hdm | ||
bundle config set --local path 'vendor/bundle' | ||
bundle config set --local with 'development' | ||
bundle install | ||
yarn install --check-files | ||
|
||
### **Configure hdm** | ||
|
||
cp config/hdm.yml.template config/hdm.yml | ||
# vim config/hdm.yml # adopt config | ||
bundle exec rails db:setup | ||
echo "secret" | EDITOR="vim" bundle exec rails credentials:edit | ||
bundle exec rails server & | ||
|
||
For development there is per default a fake_puppet_db configured. | ||
It can be startet on a second shell: | ||
|
||
./bin/fake_puppet_db & | ||
|
||
In case of layout errors you can run `bundle exec rails tmp:clear`. | ||
To reset your database run at anytime `rails db:reset`. | ||
The example development puppet configuration can be found in the directory | ||
`test/fixtures/files/puppet`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=HDM | ||
Requires=network.target | ||
|
||
[Service] | ||
Type=simple | ||
# User=rails | ||
# Group=rails | ||
WorkingDirectory=/opt/hdm | ||
# ExecStart=/bin/bash -lc 'bundle exec rails server -e production --bind 0.0.0.0 --port 80' | ||
ExecStart=/bin/bash -lc 'bundle exec rails server -b 0.0.0.0' | ||
TimeoutSec=30 | ||
RestartSec=15s | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the mentioning of psick.