-
Notifications
You must be signed in to change notification settings - Fork 6
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
Change location of config files and runtime data #42
Open
tiran
wants to merge
1
commit into
master
Choose a base branch
from
config_location
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−27
Open
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,25 +68,25 @@ using this script, you can skip this section and jump to the next thing, which | |
outlines some post-install necessities | ||
|
||
First, if it is not already present, the installer copies | ||
share/freeipa_community_portal/conf/freeipa_community_portal.ini to | ||
/etc/freeipa_community_portal.ini. The latter location is where the portal | ||
searches for the config, which is mostly used for email settings. If it is not | ||
present or formatted correctly, the portal will crash on start. Even if you're | ||
not using the install, I recommend copying this file over, instead of typing | ||
it from scratch, to avoid errors. | ||
freeipa_community_portal/conf/freeipa_community_portal.ini to | ||
/etc/ipa/extensions/community-portal/portal.ini. The latter location is where | ||
the portal searches for the config, which is mostly used for email settings. | ||
If it is not present or formatted correctly, the portal will crash on start. | ||
Even if you're not using the install, I recommend copying this file over, | ||
instead of typing it from scratch, to avoid errors. | ||
|
||
You must edit this configuration file in order for the application to work | ||
properly. If the email settings are misconfigured, the application will crash. | ||
|
||
Next, the installer copies the apache config from the conf directory to | ||
/etc/httpd/conf.d/freeipa_community_portal.conf. If you're doing a custom | ||
/etc/httpd/conf.d/ipa-community-portal.conf. If you're doing a custom | ||
installation of the portal, you probably will not need this file, because you | ||
probably know what you're doing. | ||
|
||
Then, the installer creates the directory where the portal keeps its database:: | ||
|
||
mkdir -p -m 750 /var/lib/freeipa_community_portal | ||
chown apache:apache /var/lib/freeipa_community_portal/ | ||
mkdir -p -m 750 /var/lib/ipa-community-portal | ||
chown apache:apache /var/lib/ipa-community-portal | ||
|
||
If Apache doesn't own this folder, it will vomit when attempting to put | ||
database in it. Next, the installer generates a random key and stores it in a | ||
|
@@ -148,15 +148,14 @@ the portal user. A client keytab for the portal can be acquired with | |
``ipa-getkeytab``. You must properly secure the keytab, so it can only be | ||
read by the webserver:: | ||
|
||
ipa-getkeytab -s IPA_SERVER_HOSTNAME -p [email protected] -k /etc/ipa/portal.keytab | ||
chown apache:apache /etc/ipa/portal.keytab | ||
chmod 640 /etc/ipa/portal.keytab | ||
ipa-getkeytab -s IPA_SERVER_HOSTNAME -p [email protected] -k /etc/ipa/extensions/community-portal/portal.keytab | ||
chown apache:apache /etc/ipa/extensions/community-portal/portal.keytab | ||
chmod 640 /etc/ipa/extensions/community-portal/portal.keytab | ||
|
||
If you don't remember the values for IPA server and realm, have a look at | ||
``/etc/ipa/default.conf``. You can set the path to keytab in | ||
``/etc/freeipa_community_portal.ini``. The app sets the environment variable | ||
``KRB5_CLIENT_KTNAME``, when the value is not empty. ipalib picks the keytab | ||
up automatically. | ||
``/etc/ipa/default.conf``. You can set the path to keytab in ``portal.ini``. | ||
The app sets the environment variable ``KRB5_CLIENT_KTNAME``, when the value | ||
is not empty. ipalib picks the keytab up automatically. | ||
|
||
After all this, you should probably set up and configure mod_ssl and put the | ||
app behind HTTPS, but that is outside of the scope of this guide. | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# This file contains canned, production values for deployment. It should be | ||
# edited by the end-user for their particular deployment, especially the | ||
# Mailers section. It is installed as part of the install script to: | ||
# /etc/freeipa_community_portal.ini | ||
# /etc/ipa/extensions/community-portal/portal.ini | ||
|
||
[Mailers] | ||
# SMTP connection settings | ||
|
@@ -22,10 +22,10 @@ [email protected] | |
|
||
[Database] | ||
# the directory where we store our databases | ||
db_directory=/var/lib/freeipa_community_portal/ | ||
db_directory=/var/lib/ipa-community-portal/ | ||
|
||
[KRB5] | ||
# set KRB5_CLIENT_KTNAME if non-empty | ||
client_keytab=/etc/ipa/portal.keytab | ||
client_keytab=/etc/ipa/extensions/community-portal/portal.keytab | ||
# set KRB5CCNAME if non-empty | ||
ccache_name= |
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
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
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.
These same string literals appear in freeipa-portal-install and create-portal-user.
We should define them here in the lib and import from the scripts.
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.
We can get rid of freeipa-portal-install as soon as we have RPM packages.
For create-portal-user I'm planning to use freeipa_community_portal.config in the script.