Skip to content

Commit

Permalink
mgr/dashboard: cephadm e2e job: set static ip to VM
Browse files Browse the repository at this point in the history
- Set static IPs to VMs.
- Remove domain in cluster definition to avoid side effects of potential dns misconfiguration.

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
  • Loading branch information
alfonsomthd committed Dec 22, 2021
1 parent eb5290f commit 578b5b1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
Expand Up @@ -22,9 +22,9 @@ fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"

{% for number in range(1, nodes) %}
ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}
{% if expanded_cluster is defined %}
${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}.{{ domain }}
${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}
{% endif %}
{% endfor %}

Expand Down
11 changes: 8 additions & 3 deletions src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml
@@ -1,8 +1,10 @@
parameters:
nodes: 4
node_ip_offset: 100
pool: ceph-dashboard
network: ceph-dashboard
domain: cephlab.com
gateway: 192.168.100.1
netmask: 255.255.255.0
prefix: ceph
numcpus: 1
memory: 2048
Expand All @@ -21,9 +23,12 @@ parameters:
reserveip: true
reservedns: true
sharedkey: true
domain: {{ domain }}
nets:
- {{ network }}
- name: {{ network }}
ip: 192.168.100.{{ node_ip_offset + number }}
gateway: {{ gateway }}
mask: {{ netmask }}
dns: {{ gateway }}
disks: {{ disks }}
pool: {{ pool }}
sharedfolders: [{{ ceph_dev_folder }}]
Expand Down
Expand Up @@ -7,10 +7,10 @@ describe('Create cluster add host page', () => {
const createCluster = new CreateClusterWizardHelper();
const createClusterHostPage = new CreateClusterHostPageHelper();
const hostnames = [
'ceph-node-00.cephlab.com',
'ceph-node-01.cephlab.com',
'ceph-node-02.cephlab.com',
'ceph-node-[01-03].cephlab.com'
'ceph-node-00',
'ceph-node-01',
'ceph-node-02',
'ceph-node-[01-03]'
];
const addHost = (hostname: string, exist?: boolean, pattern?: boolean, labels: string[] = []) => {
cy.get('.btn.btn-accent').first().click({ force: true });
Expand Down
Expand Up @@ -25,10 +25,10 @@ describe('when cluster creation is completed', () => {
describe('Hosts page', () => {
const hosts = new HostsPageHelper();
const hostnames = [
'ceph-node-00.cephlab.com',
'ceph-node-01.cephlab.com',
'ceph-node-02.cephlab.com',
'ceph-node-03.cephlab.com'
'ceph-node-00',
'ceph-node-01',
'ceph-node-02',
'ceph-node-03'
];

beforeEach(() => {
Expand Down

0 comments on commit 578b5b1

Please sign in to comment.