public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev, da.gomez@samsung.com, p.raghav@samsung.com
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 5/6] bringup: move journal-server setup early
Date: Thu, 25 Jan 2024 12:35:06 -0800	[thread overview]
Message-ID: <20240125203507.430113-6-mcgrof@kernel.org> (raw)
In-Reply-To: <20240125203507.430113-1-mcgrof@kernel.org>

Now that we have done the cleaning up of the provisioners and have
defined an early target task which we can piggy the back on top before
the devconfig playbook is run, move the journal server setup early.

This does not make any functional changes to the file to make it easier
to review the functional changes, those will be done next.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 Makefile                        |  2 ++
 scripts/bringup.Makefile        | 56 ---------------------------------
 scripts/journal-server.Makefile | 55 ++++++++++++++++++++++++++++++++
 3 files changed, 57 insertions(+), 56 deletions(-)
 create mode 100644 scripts/journal-server.Makefile

diff --git a/Makefile b/Makefile
index 67e13edbf6ff..4ab805ae7ff5 100644
--- a/Makefile
+++ b/Makefile
@@ -86,6 +86,8 @@ endif # CONFIG_NEEDS_LOCAL_DEVELOPMENT_PATH
 ANSIBLE_EXTRA_ARGS += $(LOCAL_DEVELOPMENT_ARGS)
 
 include scripts/provision.Makefile
+include scripts/journal-server.Makefile
+
 KDEVOPS_BRING_UP_DEPS += $(KDEVOPS_BRING_UP_DEPS_EARLY)
 KDEVOPS_BRING_UP_DEPS += $(KDEVOPS_PROVISIONED_DEVCONFIG)
 
diff --git a/scripts/bringup.Makefile b/scripts/bringup.Makefile
index 6e64b6c12172..5a4778473eab 100644
--- a/scripts/bringup.Makefile
+++ b/scripts/bringup.Makefile
@@ -33,50 +33,6 @@ ifeq (y,$(CONFIG_KDEVOPS_SETUP_SIW))
 KDEVOPS_BRING_UP_DEPS += siw
 endif # KDEVOPS_SETUP_SIW
 
-ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
-
-JOURNAL_REMOTE:=$(subst ",,$(CONFIG_DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL))
-ANSIBLE_EXTRA_ARGS += devconfig_systemd_journal_remote_url=$(JOURNAL_REMOTE)
-ANSIBLE_EXTRA_ARGS += devconfig_enable_systemd_journal_remote='True'
-
-journal-client:
-	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
-		-f 30 -i hosts  \
-		--extra-vars '{ kdevops_cli_install: True }' \
-		--tags vars_simple,journal \
-		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
-
-journal-server:
-	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
-		--inventory localhost, \
-		$(KDEVOPS_PLAYBOOKS_DIR)/install_systemd_journal_remote.yml \
-		-e 'ansible_python_interpreter=/usr/bin/python3'
-
-journal-restart:
-	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
-		-f 30 -i hosts  \
-		--tags vars_extra,journal-upload-restart \
-		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
-
-journal-status:
-	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
-		-f 30 -i hosts  \
-		--tags vars_extra,journal-status \
-		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
-
-journal-ls:
-	@$(Q)./workflows/kdevops/scripts/jounal-ls.sh /var/log/journal/remote/
-
-journal-ln:
-	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
-		-f 30 -i hosts  \
-		--tags vars_extra,journal_ln \
-		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
-
-KDEVOPS_BRING_UP_DEPS += journal-server
-
-endif
-
 update_etc_hosts:
 	$(Q)ansible-playbook $(ANSIBLE_VERBOSE) \
 		-f 30 -i hosts playbooks/update_etc_hosts.yml
@@ -100,18 +56,6 @@ bringup-setup-help-menu:
 
 HELP_TARGETS += bringup-setup-help-menu
 
-ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
-journal-help:
-	@echo "journal-server	   - Setup systemd-journal-remote on localhost"
-	@echo "journal-client	   - Setup systemd-journal-upload on clients"
-	@echo "journal-restart	   - Restart client upload service"
-	@echo "journal-status	   - Ensure systemd-journal-remote works"
-	@echo "journal-ls          - List journals available and sizes"
-	@echo "journal-ln          - Add symlinks with hostnames"
-
-HELP_TARGETS += journal-help
-endif
-
 bringup-setup-help-end:
 	@echo ""
 
diff --git a/scripts/journal-server.Makefile b/scripts/journal-server.Makefile
new file mode 100644
index 000000000000..3c32d5df982e
--- /dev/null
+++ b/scripts/journal-server.Makefile
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: copyleft-next-0.3.1
+
+ifeq (y,$(CONFIG_DEVCONFIG_ENABLE_SYSTEMD_JOURNAL_REMOTE))
+
+JOURNAL_REMOTE:=$(subst ",,$(CONFIG_DEVCONFIG_SYSTEMD_JOURNAL_REMOTE_URL))
+ANSIBLE_EXTRA_ARGS += devconfig_systemd_journal_remote_url=$(JOURNAL_REMOTE)
+ANSIBLE_EXTRA_ARGS += devconfig_enable_systemd_journal_remote='True'
+
+journal-client:
+	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
+		-f 30 -i hosts  \
+		--extra-vars '{ kdevops_cli_install: True }' \
+		--tags vars_simple,journal \
+		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
+
+journal-server:
+	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) --connection=local \
+		--inventory localhost, \
+		$(KDEVOPS_PLAYBOOKS_DIR)/install_systemd_journal_remote.yml \
+		-e 'ansible_python_interpreter=/usr/bin/python3'
+
+journal-restart:
+	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
+		-f 30 -i hosts  \
+		--tags vars_extra,journal-upload-restart \
+		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
+
+journal-status:
+	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
+		-f 30 -i hosts  \
+		--tags vars_extra,journal-status \
+		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
+
+journal-ls:
+	@$(Q)./workflows/kdevops/scripts/jounal-ls.sh /var/log/journal/remote/
+
+journal-ln:
+	@$(Q)ansible-playbook $(ANSIBLE_VERBOSE) -l baseline,dev \
+		-f 30 -i hosts  \
+		--tags vars_extra,journal_ln \
+		$(KDEVOPS_PLAYBOOKS_DIR)/devconfig.yml
+
+KDEVOPS_BRING_UP_DEPS += journal-server
+
+journal-help:
+	@echo "journal-server	   - Setup systemd-journal-remote on localhost"
+	@echo "journal-client	   - Setup systemd-journal-upload on clients"
+	@echo "journal-restart	   - Restart client upload service"
+	@echo "journal-status	   - Ensure systemd-journal-remote works"
+	@echo "journal-ls          - List journals available and sizes"
+	@echo "journal-ln          - Add symlinks with hostnames"
+
+HELP_TARGETS += journal-help
+
+endif
-- 
2.42.0


  parent reply	other threads:[~2024-01-25 20:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 20:35 [PATCH 0/6] Fix ordering for systemd remote journal support Luis Chamberlain
2024-01-25 20:35 ` [PATCH 1/6] mirror: add a smart git check Luis Chamberlain
2024-01-25 20:35 ` [PATCH 2/6] bringup: split provisioning into 2 steps Luis Chamberlain
2024-01-25 20:35 ` [PATCH 3/6] bringup: share bringup method targe and agument by two steps Luis Chamberlain
2024-01-25 20:35 ` [PATCH 4/6] provision: move all provisioning things to its own Makefile Luis Chamberlain
2024-01-25 20:35 ` Luis Chamberlain [this message]
2024-01-25 20:35 ` [PATCH 6/6] journal-server: fix by adjusting ordering Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240125203507.430113-6-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=da.gomez@samsung.com \
    --cc=kdevops@lists.linux.dev \
    --cc=p.raghav@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox