From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67AB1137C2E for ; Thu, 25 Jan 2024 20:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706214916; cv=none; b=ZVJQY6ecQx/X8ATl3xYrAiQTnmCy4RtjIO7xBlstJ7w7EBSaMS9ykea5zI4F1YHdSux2/4GpU+Z1DLJ3VUp6s/GwA9svvS+t75cvt6EEtzXeFhP/XaW7fNg2nKHLNWEt25bgWkPgxqElzGB/mnEWFDIuIzHEKgepsOAlujgboZY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706214916; c=relaxed/simple; bh=SklpZKmG4ELarkDHyXSc9Wiru0Y23s78jRG+doH8ZKg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a+1zF6Z0kdLTpeju7TxChF8S7Thbu4drTq7rQ5hYind+co5P8TkhZicPYssOF2fmxn8AmxFPmZUzbCLO4e12LP2QTD7D1VIRrwm0S5U+uDEi8Ww0LiRWs3kzzfUelazirDmR/dcH/vQmOkjx/JOrGfLd9DQLMpq7Jnuvito2S7U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=QbzTFQL5; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QbzTFQL5" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=dDUw8djOOehJz3q1679DczsgA49hL4VPR+u7gE0PuFw=; b=QbzTFQL5c5rZ8dtv3sVrvbs81A JiijSV5U0YZrIqmo3v9K59WC9v0BazShHFi5cNaSrcv9lUnJ/qnGuD92eBrmXF3ypQCN/2XKYQ/TM BOO5ivFNcrRBRREi+KN1rGOSHLKGZcZmp0/oNMGpDEQqXi49gyV2sMohe1W+GHB787JREGcvk1EB/ gE9Zhgawcntj5I5PIVz5itwMi3Ubh5ib2ff4OIGYy3pbQ9UY3wEeN0Y73fSuM4Vp/tCrJgZ/wb/lY n41J45PAM9d5YGsspP8jyd9dX/a6NnFxWG0wvOrxcG0uTYjSAnoIiL3pIP06G7/ZAC0gN+QMvpJHB 9ho/Pv4Q==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rT6RK-00000001ntl-2Kts; Thu, 25 Jan 2024 20:35:10 +0000 From: Luis Chamberlain To: kdevops@lists.linux.dev, da.gomez@samsung.com, p.raghav@samsung.com Cc: Luis Chamberlain Subject: [PATCH 5/6] bringup: move journal-server setup early Date: Thu, 25 Jan 2024 12:35:06 -0800 Message-ID: <20240125203507.430113-6-mcgrof@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240125203507.430113-1-mcgrof@kernel.org> References: <20240125203507.430113-1-mcgrof@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain 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 --- 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