WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 1608db7

Browse files
mitchelbaker-cisacbaxleyClint Baxley
authored
Fixes dashboard update not importing on fresh install (#167) (#169)
* Fixes dashboard update not importing on fresh install #165 * Update upgrading.md to include status on v1.3.2, along with revisions to the document overall * remove step 4 from upgrading.md; add additional instructions for v1.3.2 --------- Co-authored-by: Clint Baxley <[email protected]> Co-authored-by: Clint Baxley <[email protected]>
1 parent 6cbef43 commit 1608db7

File tree

3 files changed

+15
-43
lines changed

3 files changed

+15
-43
lines changed

Chapter 3 Files/dashboard_update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ -r /opt/lme/lme.conf ]; then
99
#reference this file as a source
1010
. /opt/lme/lme.conf
1111
#check if the version number is equal to the one we want
12-
if [ "$version" == "1.3.0" ]; then
12+
if [ "$version" == "1.3.0" ] || [ "$FRESH_INSTALL" = "true" ]; then
1313
echo -e "\e[32m[X]\e[0m Updating from git repo"
1414
git -C /opt/lme/ pull
1515
#make sure the hostname variable is present

Chapter 3 Files/deploy.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,7 @@ function fixreadability() {
740740

741741

742742
function install() {
743+
export FRESH_INSTALL="true"
743744
echo -e "Will execute the following intrusive actions:\n\t- apt update & upgrade\n\t- install docker (please uninstall before proceeding, or indicate skipping the install)\n\t- initialize docker swarm (execute \`sudo docker swarm leave --force\` before proceeding if you are part of a swarm\n\t- automatic os updates via unattened-upgrades\n\t- checkout lme directory to latest version, and throw away local changes)"
744745

745746
prompt "Proceed?"
@@ -752,10 +753,11 @@ function install() {
752753
fi
753754

754755
echo -e "\e[32m[X]\e[0m Updating OS software"
755-
apt update && apt upgrade -y
756+
apt-get update
757+
DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get upgrade -yq
756758

757759
echo -e "\e[32m[X]\e[0m Installing prerequisites"
758-
apt install ${REQUIRED_PACKS[*]} -y -q
760+
DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install ${REQUIRED_PACKS[*]} -yq
759761

760762
if [ -f /var/run/reboot-required ]; then
761763
echo -e "\e[31m[!]\e[0m A reboot is required in order to proceed with the install."
@@ -1173,7 +1175,7 @@ then
11731175
ready "Will install the following packages: ${missing_pkgs[*]}. These are required for LME."
11741176
sudo apt-get update
11751177
#confirm install
1176-
sudo apt-get --yes install ${missing_pkgs[*]}
1178+
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get -yq install ${missing_pkgs[*]}
11771179
fi
11781180

11791181
#Change current working directory so relative filepaths work

docs/markdown/maintenance/upgrading.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Below you can find the upgrade paths that are currently supported and what steps
66

77
Applying these changes is automated for any new installations. But, if you have an existing installation, you need to conduct some extra steps. **Before performing any of these steps it is advised to take a backup of the current installation using the method described [here](/docs/markdown/maintenance/backups.md).**
88

9-
To upgrade to the latest version from Release 1.2.0 to Release 1.3.0 [go here](#6-upgrade-from-120-to-130).
10-
119
## 1. Finding your LME version (and the components versions)
1210
When reporting an issue or suggesting improvements, it is important to include the versions of all the components, where possible. This ensures that the issue has not already been fixed!
1311

@@ -26,10 +24,10 @@ When reporting an issue or suggesting improvements, it is important to include t
2624

2725

2826
## 2. Upgrade from versions prior to v0.5
29-
LME does not support upgrading directly from versions prior to 0.5 to 1.0. Prior to switching to CISA's repo, first upgrade to the latest version of LME published by the NCSC (v0.5.1). Then follow the instructions above to upgrade to v1.0.
27+
LME does not support upgrading directly from versions prior to v0.5 to v1.0. Prior to switching to CISA's repo, first upgrade to the latest version of LME published by the NCSC (v0.5.1). Then follow the instructions above to upgrade to v1.0.
3028

3129

32-
## 3. Upgrade from v0.5 to 1.0.0
30+
## 3. Upgrade from v0.5 to v1.0.0
3331

3432
Since LME's transition from the NCSC to CISA, the location of the LME repository has changed from `https://github.com/ukncsc/lme` to `https://github.com/cisagov/lme`. To obtain any further updates to LME on the ELK server, you will need to transition to the new git repository. Because vital configuration files are stored within the same folder as the git repo, it's simpler to copy the old LME folder to a different location, clone the new repo, copy the files and folders unique to your system, and then optionally delete the old folder. You can do this by running the following commands:
3533

@@ -111,55 +109,27 @@ LME v1.0 made a minor change to the file structure used in the SYSVOL folder, so
111109
3. Is the LME folder inside SYSVOL properly structured? Refer to the checklist listed at the end of chapter 2.
112110
4. Are the events from all clients visible inside elastic? Refer to [4.1.2 Check you are receiving logs](/docs/markdown/chapter4.md#412-check-you-are-receiving-logs).
113111

112+
## 4. Upgrade to v1.3.1
114113

115-
## 4. Upgrade from 1.0.0 to 1.1.0
116-
To fetch the latest changes, on the Linux server, run the following commands as root:
117-
```
118-
cd /opt/lme
119-
git pull
120-
```
121-
122-
To manually update the dashboards, see [How to update dashboards](/Chapter%204%20Files/dashboards#how-to-update-dashboards).
114+
This is a hotfix to the install script and some additional troubleshooting steps added to documentation on space management. Unless you're encountering problems with your current installation, or if your logs are running out of space, there's no need to upgrade to v1.3.1, as it doesn't offer any additional functionality changes.
123115

124-
Additionally, to fix a potential file permission issue present in v1.0.0, run the following command on the Linux server:
125-
```
126-
sudo chown -R 1000:1000 /opt/lme/backups
127-
```
116+
## 5. Upgrade to v1.3.2
128117

129-
See [Directory permission issues](/docs/markdown/reference/troubleshooting.md#directory-permission-issues) for more details.
118+
This is a hotfix to address dashboards which failed to load on a fresh install of v1.3.1. If you are currently running v1.3.0, you do not need to upgrade at this time. If you are running versions **before** 1.3.0 or are running v1.3.1, we recommend you upgrade to the latest version.
130119

120+
Please refer to the [Upgrading to latest version](/docs/markdown/maintenance/upgrading.md#upgrading-to-latest-version) to apply the hotfix.
131121

132-
## 5. Upgrade from 1.1.0 to 1.2.0
122+
## 6. Upgrade to latest version
133123
To fetch the latest changes, on the Linux server, run the following commands as root:
134124
```
135-
cd /opt/lme/Chapter\ 3\ Files/
136-
sudo ./deploy.sh uninstall
137-
cd /opt/lme
138125
git pull
139-
cd Chapter\ 3\ Files/
140-
sudo ./deploy.sh install
141-
```
142-
143-
The deploy.sh script should have now created new files on the Linux server at location /opt/lme/files_for_windows.zip . This file needs to be copied across and used on the Windows Event Collector server like it was explained in Chapter 3 sections [3.2.4 & 3.3 ](/docs/markdown/chapter3/chapter3.md#324-download-files-for-windows-event-collector).
144-
145-
Then reboot your Client computers & Windows Event Collector. On Windows Event Collector open services.msc as an administrator and make sure the winlogbeat service is set to start automatically, and is running.
146-
147-
## 6. Upgrade from 1.2.0 to 1.3.0
148-
To fetch the latest changes, run the following commands as root on the Linux server:
149-
```
126+
git checkout main
150127
cd /opt/lme/Chapter\ 3\ Files/
151128
sudo ./deploy.sh uninstall
152129
cd /opt/lme
153-
git pull
154130
cd Chapter\ 3\ Files/
155131
sudo ./deploy.sh install
156132
```
157133

158134
The deploy.sh script should have now created new files on the Linux server at location /opt/lme/files_for_windows.zip . This file needs to be copied across and used on the Windows Event Collector server like it was explained in Chapter 3 sections [3.2.4 & 3.3 ](/docs/markdown/chapter3/chapter3.md#324-download-files-for-windows-event-collector).
159135

160-
Then reboot your Client computers & Windows Event Collector. On Windows Event Collector open services.msc as an administrator and make sure the winlogbeat service is set to start automatically, and is running.
161-
162-
## 7. Upgrade from 1.3.0 to 1.3.1
163-
164-
This is a hotfix to the install script and some additional troubleshooting steps added to documentation on space management. Unless you're encountering problems with your current installation, or if your logs are running out of space, there's no need to upgrade to version 1.3.1, as it doesn't offer any additional functionality changes.
165-

0 commit comments

Comments
 (0)