Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push / Pull Sites #22672

Closed
Tracked by #22540
fabrizzio-dotCMS opened this issue Aug 2, 2022 · 7 comments · Fixed by #24118, #24747 or #24750
Closed
Tracked by #22540

Push / Pull Sites #22672

fabrizzio-dotCMS opened this issue Aug 2, 2022 · 7 comments · Fixed by #24118, #24747 or #24750

Comments

@fabrizzio-dotCMS
Copy link
Contributor

Using the Quarkus example supplied by Steve, we should begin the process of building out a CLI that can "sync" e.g. pull and push Sites to dotCMS.

Questions:

Hostname vs. hostId
Deterministic Ids?
Use content type var everywhere
hide default fields
e.g. don't show props that have false/0/empty string
How to handle content type updates / deletes

@stale
Copy link

stale bot commented Dec 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 1, 2022
@stale stale bot closed this as completed Dec 8, 2022
@fabrizzio-dotCMS fabrizzio-dotCMS removed their assignment Jan 30, 2023
@damen-dotcms damen-dotcms moved this from New to In Progress in dotCMS - Product Planning Feb 6, 2023
@damen-dotcms damen-dotcms reopened this Feb 6, 2023
fabrizzio-dotCMS added a commit that referenced this issue Feb 10, 2023
fabrizzio-dotCMS added a commit that referenced this issue Feb 15, 2023
nollymar pushed a commit that referenced this issue Feb 16, 2023
@nollymar nollymar linked a pull request Feb 16, 2023 that will close this issue
fabrizzio-dotCMS added a commit that referenced this issue Feb 17, 2023
@damen-dotcms damen-dotcms removed the Epic label Feb 17, 2023
@nollymar nollymar moved this from In Progress to In Review in dotCMS - Product Planning Feb 21, 2023
nollymar pushed a commit that referenced this issue Feb 23, 2023
* #22672 per given feedback refactoring commands layout

* #22672 save point

* #24168 refactoring into sub-commands

* #24168  refactoring commands + README updates

* #24168  adding general help option to main sub commands
@nollymar
Copy link
Contributor

nollymar commented May 2, 2023

Internal QA: Needs work

  • The host switch is not failing now but the site is never switched even when it says Successfully switching to site: [mysitename].

  • I keep seeing this typo Site [test2] **delete** successfully

  • I can't push a new site using a json or yml file

@nollymar nollymar moved this from Internal QA to Current Sprint Backlog in dotCMS - Product Planning May 2, 2023
@fabrizzio-dotCMS fabrizzio-dotCMS moved this from Current Sprint Backlog to In Progress in dotCMS - Product Planning May 4, 2023
fabrizzio-dotCMS added a commit that referenced this issue May 5, 2023
@fabrizzio-dotCMS
Copy link
Contributor Author

fabrizzio-dotCMS commented May 5, 2023

host switch command does not work for our CLI client because we're not sending the session tracking bits.
All we send is an authentication token
The site switch operation occurs at the session level on the server side. But it is failing to track a session for the cli
so we're getting the fallback which is the current site.
@spbolton you think is it possible to add the missing bits to accomplish session tracking?

@wezell
Copy link
Contributor

wezell commented May 5, 2023

we should not host switch with the CLI. the CLI needs to be stateless.

@fabrizzio-dotCMS
Copy link
Contributor Author

ok, then I'll remove the site switch command

nollymar pushed a commit that referenced this issue May 9, 2023
* #22672 more fixes

* #22672 site switch  removed and other fixes
@nollymar nollymar moved this from In Progress to In Review in dotCMS - Product Planning May 9, 2023
@nollymar nollymar moved this from In Review to Internal QA in dotCMS - Product Planning May 9, 2023
@dcolina dcolina self-assigned this Jun 1, 2023
@dcolina
Copy link
Contributor

dcolina commented Jun 2, 2023

Internal QA:

Step by step:

  1. Login via CLI with the command login -u [email protected] -p admin.

Screenshot 2023-06-02 at 15 13 33

  1. Download the default site with the command site pull --format=YAML -to=backup.dotcms.com.yaml demo.dotcms.com.

Screenshot 2023-06-02 at 15 14 43

  1. Using a text editor, change some properties of the file backup.dotcms.com.yaml. For example
---
siteName: "backup.dotcms.com"
tagStorage: "SYSTEM_HOST"
keywords: "CMS, Web Content Management, Open Source, Java, J2EE, DXP, NoCode, OSGI,\
  \ Apache Velocity, Elasticsearch, RESTful Services, REST API, Workflows, Personalization,\
  \ Multilingual, I18N, L10N, Internationalization, Localization, Docker CMS, Containerized\
  \ CMS"
description: "dotCMS testing site pull / push command ::::"
languageId: 1
modDate: "2023-06-02T00:00:00.000+00:00"
modUser: "dotcms.org.1"
live: true
working: true
  1. Once the file is saved, we publish it with the command site push --force --format=YAML backup.dotcms.com.yaml.

Screenshot 2023-06-02 at 15 16 33

HINT:
Instead of checking [ERROR] No site named [backup.dotcms.com] was found. I think that a [WARN] might be better because after all the push operation is running correctly.

  1. As a last step, we list all sites with the site command, in the result we can see both the default site and the new site uploaded in the previous step.

Screenshot 2023-06-02 at 15 17 27

NOTE:
When running the site help command, there is a small error in the description of the --force parameter, "Force must me set to true to update a site name". It should read "Force must be set to true to update a site name".

Screenshot 2023-06-02 at 14 04 44

Internal QA: PASSED.

  • Functionality works as expected.

@dcolina dcolina moved this from Internal QA to QA - Backlog in dotCMS - Product Planning Jun 2, 2023
@dcolina dcolina removed their assignment Jun 2, 2023
@nollymar nollymar moved this from QA - Backlog to Done in dotCMS - Product Planning Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment