Changes between Version 9 and Version 10 of NSM2021/Agenda/iCinga


Ignore:
Timestamp:
May 23, 2021, 12:12:29 AM (4 years ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NSM2021/Agenda/iCinga

    v9 v10  
    2727Select `yes` for the options pop up when icinga2-ido-mysql starts installing and creating database for module. Enter a password for when it prompt(it is used for icinga2 database)
    2828
     29
    2930== Manual Installation ==
    3031
     
    122123==== Setting up the MySQL database ====
    123124
    124  `mysql -u root -p`
    125 
    126 `CREATE DATABASE icinga;`
    127 
    128 `CREATE USER 'icinga'@'localhost' IDENTIFIED BY '###PASSSWORD### ;`
    129 
    130 `GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost';`
    131 
    132 `quit`
     125{{{
     126 mysql -u root -p
     127
     128CREATE DATABASE icinga;
     129
     130CREATE USER 'icinga'@'localhost' IDENTIFIED BY '###PASSSWORD### ;
     131
     132GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost';
     133
     134quit
     135}}}
    133136
    134137After creating the database you can import the Icinga 2 IDO schema using the following command. Enter the root password into the prompt when asked.
     
    166169`vim /etc/icinga2/conf.d/api-users.conf`
    167170
     171{{{
    168172object ApiUser "icingaweb2" {
    169173  password = "Wijsn8Z9eRs5E25d"
    170174  permissions = [ "status/query", "actions/*", "objects/modify/*", "objects/query/*" ]
    171175}
     176}}}
    172177
    173178(add an api user for the director as well)
     
    204209===== For icingaweb db ====
    205210
    206 `CREATE DATABASE icingaweb2;`
    207 
    208 `CREATE USER icingaweb2@localhost IDENTIFIED BY '##PASSWORD##';`
    209 
    210 `GRANT ALL ON icingaweb2.* TO icingaweb2@localhost;`
    211 
    212 `Flush privileges;`
    213 
    214 `quit`
     211{{{
     212CREATE DATABASE icingaweb2;
     213
     214CREATE USER icingaweb2@localhost IDENTIFIED BY '##PASSWORD##';
     215
     216GRANT ALL ON icingaweb2.* TO icingaweb2@localhost;
     217
     218Flush privileges;
     219
     220quit
     221}}}
    215222
    216223===== director db =====
    217224
    218 `CREATE DATABASE director CHARACTER SET 'utf8';`
    219 
    220 `CREATE USER director@localhost IDENTIFIED BY '##PASSWORD##';`
    221 
    222 `GRANT ALL ON director.* TO director@localhost;`
    223 
    224 `Flush privileges;`
    225 
    226 `quit`
     225{{{
     226CREATE DATABASE director CHARACTER SET 'utf8';
     227
     228CREATE USER director@localhost IDENTIFIED BY '##PASSWORD##';
     229
     230GRANT ALL ON director.* TO director@localhost;
     231
     232Flush privileges;
     233
     234quit
     235}}}
    227236
    228237=== enabling reactbundle module ===
     
    230239Copy following script to a bash flle and execute or execute in the terminal.
    231240
    232 `REACTBUNDLE_MODULE_NAME=reactbundle`
    233 
    234 `REACTBUNDLE_MODULE_VERSION=v0.9.0`
    235 
    236 `REACTBUNDLE_REPO="https://github.com/Icinga/icingaweb2-module-${REACTBUNDLE_MODULE_NAME}"`
    237 
    238 `MODULES_PATH="/usr/share/icingaweb2/modules"`
    239 
    240 `git config --global advice.detachedHead false`
    241 
    242 `git clone ${REACTBUNDLE_REPO} "${MODULES_PATH}/${REACTBUNDLE_MODULE_NAME}" --branch "${REACTBUNDLE_MODULE_VERSION}"`
    243 
    244 `icingacli module enable "${REACTBUNDLE_MODULE_NAME}"`
     241{{{
     242REACTBUNDLE_MODULE_NAME=reactbundle
     243
     244REACTBUNDLE_MODULE_VERSION=v0.9.0
     245
     246REACTBUNDLE_REPO="https://github.com/Icinga/icingaweb2-module-${REACTBUNDLE_MODULE_NAME}"
     247
     248MODULES_PATH="/usr/share/icingaweb2/modules"
     249
     250git config --global advice.detachedHead false
     251
     252git clone ${REACTBUNDLE_REPO} "${MODULES_PATH}/${REACTBUNDLE_MODULE_NAME}" --branch "${REACTBUNDLE_MODULE_VERSION}"
     253
     254icingacli module enable "${REACTBUNDLE_MODULE_NAME}"
     255}}}
    245256
    246257=== enabling ipl module ===
     
    248259Copy following script to a bash flle and execute or execute in the terminal.
    249260
    250 `IPL_MODULE_NAME=ipl`
    251 
    252 `IPL_MODULE_VERSION=v0.5.0`
    253 
    254 `IPL_REPO="https://github.com/Icinga/icingaweb2-module-${IPL_MODULE_NAME}"`
    255 
    256 `MODULES_PATH="/usr/share/icingaweb2/modules"`
    257 
    258 `git clone ${IPL_REPO} "${MODULES_PATH}/${IPL_MODULE_NAME}" --branch "${IPL_MODULE_VERSION}"`
    259 
    260 `icingacli module enable "${IPL_MODULE_NAME}"`
     261{{{
     262IPL_MODULE_NAME=ipl
     263
     264IPL_MODULE_VERSION=v0.5.0
     265
     266IPL_REPO="https://github.com/Icinga/icingaweb2-module-${IPL_MODULE_NAME}"
     267
     268MODULES_PATH="/usr/share/icingaweb2/modules"
     269
     270git clone ${IPL_REPO} "${MODULES_PATH}/${IPL_MODULE_NAME}" --branch "${IPL_MODULE_VERSION}"
     271
     272icingacli module enable "${IPL_MODULE_NAME}"
     273}}}
    261274
    262275=== enabling incubator module ===
     
    264277Copy following script to a bash flle and execute or execute in the terminal.
    265278
    266 `INCUBATOR_MODULE_NAME=incubator`
    267 
    268 `INCUBATOR_MODULE_VERSION=v0.6.0`
    269 
    270 `INCUBATOR_REPO="https://github.com/Icinga/icingaweb2-module-${INCUBATOR_MODULE_NAME}"`
    271 
    272 `MODULES_PATH="/usr/share/icingaweb2/modules"`
    273 
    274 `git clone ${INCUBATOR_REPO} "${MODULES_PATH}/${INCUBATOR_MODULE_NAME}" --branch "${INCUBATOR_MODULE_VERSION}"`
    275 
    276 `icingacli module enable "${INCUBATOR_MODULE_NAME}"`
     279{{{
     280INCUBATOR_MODULE_NAME=incubator
     281
     282INCUBATOR_MODULE_VERSION=v0.6.0
     283
     284INCUBATOR_REPO="https://github.com/Icinga/icingaweb2-module-${INCUBATOR_MODULE_NAME}"
     285
     286MODULES_PATH="/usr/share/icingaweb2/modules"
     287
     288git clone ${INCUBATOR_REPO} "${MODULES_PATH}/${INCUBATOR_MODULE_NAME}" --branch "${INCUBATOR_MODULE_VERSION}"
     289
     290icingacli module enable "${INCUBATOR_MODULE_NAME}"
     291}}}
    277292
    278293=== Enabling Director in Icinga ===
     
    280295Copy following script to a bash flle and execute. The script with the files to the relevant directory using the script
    281296
    282 `ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"`
    283 
    284 `REPO_URL="https://github.com/icinga/icingaweb2-module-director"`
    285 
    286 `TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"`
    287 
    288 `MODULE_VERSION="1.8.0"`
    289 
    290 `git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION}`
     297{{{
     298
     299ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
     300
     301REPO_URL="https://github.com/icinga/icingaweb2-module-director"
     302
     303TARGET_DIR="${ICINGAWEB_MODULEPATH}/director"
     304
     305MODULE_VERSION="1.8.0"
     306
     307git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION}
     308}}}
    291309
    292310and then enable the icinga-director module
     
    298316Copy following script to a bash flle and execute or execute in the terminal.
    299317
    300 `BS_PROCESS_ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"`
    301 
    302 `BS_PROCESS_REPO_URL="https://github.com/Icinga/icingaweb2-module-businessprocess"`
    303 
    304 `BS_PROCESS_TARGET_DIR="${ICINGAWEB_MODULEPATH}/businessprocess"`
    305 
    306 `git clone "${BS_PROCESS_REPO_URL}" "${BS_PROCESS_TARGET_DIR}"`
     318{{{
     319BS_PROCESS_ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
     320
     321BS_PROCESS_REPO_URL="https://github.com/Icinga/icingaweb2-module-businessprocess"
     322
     323BS_PROCESS_TARGET_DIR="${ICINGAWEB_MODULEPATH}/businessprocess"
     324
     325git clone "${BS_PROCESS_REPO_URL}" "${BS_PROCESS_TARGET_DIR}"
     326}}}
    307327
    308328`icingacli module enable businessprocess`
     
    316336`useradd -r -g icingaweb2 -d /var/lib/icingadirector -s /bin/false icingadirector`
    317337
    318 `install -d -o icingadirector -g icingaweb2 -m 0750 /var/lib/icingadirector`
    319 
    320 `MODULE_PATH=/usr/share/icingaweb2/modules/director`
    321 
    322 `cp "${MODULE_PATH}/contrib/systemd/icinga-director.service" /etc/systemd/system/`
     338`apt install -d -o icingadirector -g icingaweb2 -m 0750 /var/lib/icingadirector`
     339
     340{{{
     341MODULE_PATH=/usr/share/icingaweb2/modules/director
     342
     343cp "${MODULE_PATH}/contrib/systemd/icinga-director.service" /etc/systemd/system/
     344}}}
    323345
    324346`systemctl daemon-reload`