Skip to content

cephadm: Allow users to specify dashboard port and https protocol#35594

Closed
jmolmo wants to merge 1 commit intoceph:masterfrom
jmolmo:issue_44628
Closed

cephadm: Allow users to specify dashboard port and https protocol#35594
jmolmo wants to merge 1 commit intoceph:masterfrom
jmolmo:issue_44628

Conversation

@jmolmo
Copy link
Member

@jmolmo jmolmo commented Jun 16, 2020

Added to new parameters to the bootstrap command in order to allow the user
select the dashboard port and if it ssl is going to be used or not.

Fixes: https://tracker.ceph.com/issues/44628

Apart of the modification to add the new functionality (fixing the bug) a refactor of the cephadm code has been included.
The command bootstrap has been completely refactored to use objects instead of the procedural approach.
In this moment what we have is basically "code moved", but this modification opens the door to improve the cephadm code in general, to make more easy and less error prone future modifications and to allow to start writing unit tests.

Signed-off-by: Juan Miguel Olmo Martínez jolmomar@redhat.com

-->

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Details:

Added to new parameters to the bootstrap command in order to allow the user
select the dashboard port and if it ssl is going to be used or not.

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
@jmolmo jmolmo added the cephadm label Jun 16, 2020
@jmolmo jmolmo requested review from a team, alfonsomthd, epuertat and pcuzner June 16, 2020 11:51
@jmolmo
Copy link
Member Author

jmolmo commented Jun 16, 2020

Details about tests to verify changes in dashboard port/protocol:

In all the tests, after cluster creation we have:

[root@ceph-node-00 ~]# firewall-cmd --list-all
...
  services: cockpit dhcpv6-client ssh
  ports: 
...

Dashboard (https using port 8900):

# cephadm bootstrap --mon-ip $mon_ip  --initial-dashboard-password admin --dashboard-port 8900
...
INFO:cephadm:Ceph Dashboard is now available at:

	     URL: https://ceph-node-00:8900/
	    User: admin
	Password: admin
...

[root@ceph-node-00 ~]# firewall-cmd --list-all
...
  services: ceph ceph-mon cockpit dhcpv6-client ssh
  ports: 3300/tcp 6789/tcp 9283/tcp 8900/tcp 9093/tcp 9094/tcp 3000/tcp 9100/tcp
...

Dashboard (http using port 8900):

# cephadm bootstrap --mon-ip $mon_ip  --initial-dashboard-password admin --dashboard-port 8901 --dashboard-ssl-disabled
...
  INFO:cephadm:Ceph Dashboard is now available at:

  	     URL: http://ceph-node-00:8901/
  	    User: admin
  	Password: admin
...

# firewall-cmd --list-all
...
  services: ceph ceph-mon cockpit dhcpv6-client ssh
  ports: 3300/tcp 6789/tcp 9283/tcp 8901/tcp 9093/tcp 9094/tcp 3000/tcp 9100/tcp
...

Note: Verified also cluster creation with firewald service not installed, and installed but not enabled or stopped.

@sebastian-philipp
Copy link
Contributor

Before reviewing this, can split this into multiple commits? Having dedicated commits just for moving code before doing any modifications is good habit.

@jmolmo
Copy link
Member Author

jmolmo commented Jun 17, 2020

Before reviewing this, can split this into multiple commits? Having dedicated commits just for moving code before doing any modifications is good habit.

This is only the part around the command_bootstrap. Split in several commits will take more time and possibly make more difficult everything ... I know that there are lot of lines, but basically, as you said this is "a code move" so probably not so difficult to review. Would you mind to launch integrations tests for this PR? ( when it would be possible)

@sebastian-philipp
Copy link
Contributor

Before reviewing this, can split this into multiple commits? Having dedicated commits just for moving code before doing any modifications is good habit.

This is only the part around the command_bootstrap. Split in several commits will take more time and possibly make more difficult everything ... I know that there are lot of lines, but basically, as you said this is "a code move" so probably not so difficult to review. Would you mind to launch integrations tests for this PR? ( when it would be possible)

I remember that @tchaikov insisted on splitting my 1-commit PRs this into different commits.

@mgfritch
Copy link
Contributor

Before reviewing this, can split this into multiple commits? Having dedicated commits just for moving code before doing any modifications is good habit.

I was going to make a similar comment. Having multiple commits would make this easier to review ..

@jmolmo jmolmo closed this Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants