Skip to content

Commit

Permalink
Merge pull request #443 from VinceMacBuche/ust_5267/integ_5269/migrat…
Browse files Browse the repository at this point in the history
…ion_script

Fixes #5269: Add script for group of all node without server roles
  • Loading branch information
VinceMacBuche committed Jul 16, 2014
2 parents 99d1e84 + f56dbc2 commit a0dff4c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rudder-webapp/SOURCES/rudder-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ set -e
# - 2.10.0 : Add properties to enable and configure the LDAP authentication
# - 2.11.0 : Add LDAP entries for Server Roles system Technique/Directive/Rule
# - 2.11.0 : Add the properties to configure Rudder roles
# - 2.11.0 : Add LDAP entry for Group with all nodes excluding server components
#####################################################################################

# Some variables
Expand Down Expand Up @@ -453,6 +454,14 @@ if [ ${LDAP_EXISTS} -ne 0 ]; then
echo " Done."
fi

# - 2.11.0: Add LDAP entry for Group with all nodes excluding server components
LDAP_TEST_SERVER_ROLES_GROUP=$(${LDAPSEARCH} -b "ruleTarget=special:all_nodes_without_role,groupCategoryId=SystemGroups,groupCategoryId=GroupRoot,ou=Rudder,cn=rudder-configuration" -s base dn 2> /dev/null | grep -c "dn: ruleTarget=special:all_nodes_without_role" || true)
if [ ${LDAP_TEST_SERVER_ROLES_GROUP} -eq 0 ]; then
echo -n "INFO: Adding system Group of all nodes that are not a Rudder server component..."
${LDAPADD} -f ${RUDDER_UPGRADE_TOOLS}/ldapMigration-2.10-2.11-add-node-without-role-group.ldif >/dev/null 2>&1
echo " Done."
fi

fi

# - 2.6.6 : Migration DB schema to modify indexes on RudderSysEvents to improve nodes list display
Expand Down
1 change: 1 addition & 0 deletions rudder-webapp/SPECS/rudder-webapp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-change-ids-in-tables.sql %{buildroot}%{rudderdir}/share/upgrade-tools/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/dbMigration-migrate-reports-per-node.sql %{buildroot}%{rudderdir}/share/upgrade-tools/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ldapMigration-2.10-2.11-add-server-roles.ldif %{buildroot}%{rudderdir}/share/upgrade-tools/
cp %{_sourcedir}/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ldapMigration-2.10-2.11-add-node-without-role-group.ldif %{buildroot}%{rudderdir}/share/upgrade-tools/

cp %{SOURCE5} %{buildroot}%{rudderdir}/bin/
cp %{SOURCE6} %{buildroot}%{rudderdir}/bin/
Expand Down
1 change: 1 addition & 0 deletions rudder-webapp/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ binary-arch: install
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-migrate-reports-per-node.sql /opt/rudder/share/upgrade-tools/
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ dbMigration-change-ids-in-tables.sql /opt/rudder/share/upgrade-tools/
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ ldapMigration-2.10-2.11-add-server-roles.ldif /opt/rudder/share/upgrade-tools/
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/rudder-sources/rudder/rudder-core/src/main/resources/Migration/ ldapMigration-2.10-2.11-add-node-without-role-group.ldif /opt/rudder/share/upgrade-tools/

dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-upgrade-LDAP-schema-2.6-2.7-add-global-parameter-ou.ldif /opt/rudder/share/upgrade-tools/
dh_install --SOURCEDIR=$(CURDIR)/SOURCES/ rudder-upgrade-LDAP-schema-2.6-2.7-add-default-global-parameter.ldif /opt/rudder/share/upgrade-tools/
Expand Down

0 comments on commit a0dff4c

Please sign in to comment.