Skip to content

Commit 60a961d

Browse files
author
Rohit
committed
doc
Signed-off-by: Rohit <rohit@ghost.yadav.cloud>
1 parent de070aa commit 60a961d

File tree

5 files changed

+156
-8
lines changed

5 files changed

+156
-8
lines changed

doc/centos7.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
[root@localhost yum.repos.d]# cat /etc/yum.repos.d/cloudstack.repo
2+
[cloudstack]
3+
name=cloudstack
4+
baseurl=http://download.cloudstack.org/el/8/4.17/
5+
enabled=1
6+
gpgcheck=0
7+
8+
[root@localhost ~]# yum deplist cloudstack-management cloudstack-common cloudstack-usage cloudstack-cli | awk '/provider:/ {print $2}' | sort -u | grep -v java | grep -v cloudstack | xargs yum install -y
9+
10+
hostnamectl set-hostname localhost --transient
11+
12+
[root@localhost ~]# iptables-restore < /etc/sysconfig/iptables
13+
iptables -F ?
14+
15+
[root@localhost ~]# systemctl stop firewalld
16+
[root@localhost ~]# systemctl disable firewalld
17+
18+
rm -fr /var/lib/mysql/*
19+
20+
[root@localhost ~]# systemctl stop mysqld
21+
[root@localhost ~]# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
22+
[root@localhost ~]# systemctl start mysqld
23+
[root@localhost ~]#
24+
[root@localhost ~]# mysql -u root
25+
Welcome to the MySQL monitor. Commands end with ; or \g.
26+
Your MySQL connection id is 2
27+
Server version: 5.7.32-log MySQL Community Server (GPL)
28+
29+
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
30+
31+
Oracle is a registered trademark of Oracle Corporation and/or its
32+
affiliates. Other names may be trademarks of their respective
33+
owners.
34+
35+
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
36+
37+
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'P@ssword123';
38+
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
39+
mysql> flush privileges;
40+
Query OK, 0 rows affected (0.07 sec)
41+
42+
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'P@ssword123';
43+
Query OK, 0 rows affected (0.06 sec)
44+
45+
mysql> flush privileges;
46+
Query OK, 0 rows affected (0.02 sec)
47+
48+
mysql> ^DBye
49+
50+
51+
[root@localhost ~]# systemctl stop mysqld
52+
53+
[root@localhost ~]#
54+
[root@localhost ~]# systemctl unset-environment MYSQLD_OPTS
55+
[root@localhost ~]# systemctl start mysqld
56+
[root@localhost ~]# mysql -u root
57+
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
58+
[root@localhost ~]# mysql -u root -p
59+
Enter password:
60+
Welcome to the MySQL monitor
61+
62+
63+
In /etc/my.cnf:
64+
server-id=1
65+
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
66+
binlog-format = 'ROW'
67+
log-bin=mysql-bin
68+
max_connections=700
69+
innodb_lock_wait_timeout=600
70+
innodb_rollback_on_timeout=1
71+
datadir=/var/lib/mysql
72+
73+
mysql> SHOW VARIABLES LIKE 'validate_password%';
74+
mysql> SET GLOBAL validate_password_length = 5;
75+
mysql> set global validate_password_number_count = 0;
76+
mysql> set global validate_password_mixed_case_count = 0;
77+
Query OK, 0 rows affected (0.00 sec)
78+
79+
mysql> set global validate_password_special_char_count = 0;
80+
Query OK, 0 rows affected (0.00 sec)
81+
82+
mysql> set validate_password_policy = 'LOW';
83+
ERROR 1229 (HY000): Variable 'validate_password_policy' is a GLOBAL variable and should be set with SET GLOBAL
84+
mysql> set global validate_password_policy = 'LOW';
85+
Query OK, 0 rows affected (0.00 sec)

doc/vmware.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
vmware 7.0 -> vmxnet3 or e1000e
2+
older can use e1000
3+
4+
# vmware esxi template
5+
6+
enable ssh+shell
7+
disable ipv6
8+
enable vmotion on vmk0
9+
make vmk0 nic to get dhcp as phy nic and vmk0 network/tcp stack to obtain info from dhcp/dns
10+
11+
security setting fort vSwtich0: reject/accept/accept
12+
13+
remove uuid, mac address and IP address from /etc/vmware/esx.conf
14+
remove dhcp leases from /etc/ and /var/lib/dhcp/ paths
15+
esxcfg-advcfg -s 1 /Net/FollowHardwareMac
16+
17+
# Stop hostd
18+
/etc/init.d/hostd stop
19+
20+
# Ensure the new MAC Address is automatically picked up once cloned
21+
localcli system settings advanced set -o /Net/FollowHardwareMac -i 1
22+
23+
# Remove any potential old DHCP leases
24+
rm -f /etc/dhclient*lease
25+
26+
# Ensure new system UUID is generated
27+
sed -i 's#/system/uuid.*##g' /etc/vmware/esx.conf
28+
29+
# VMware 7 only: Remove these lines from /etc/vmware/esx.conf:
30+
31+
/net/vmkernelnic/child[0000]/mac
32+
/net/pnic/child[0001]/mac
33+
/net/pnic/child[0000]/mac
34+
35+
# Unload networking + vmfs3 modules which also contains system UUID mappings
36+
vmkload_mod -u vmfs3
37+
vmkload_mod -u e1000 (before VMware 7)
38+
vmkload_mod -u nvmxnet3 (VMware 7 only)
39+
40+
# vCenter VM
41+
42+
vcenter VM: enable bash and ssh, enable ntp pool, disable password expiry;
43+
on setup use FDQN as vcenterXX.local and add entry in local router (forward and reverse dns)
44+
45+
from the VC.vmx remove:
46+
ethernet0.addressType
47+
uuid.location =
48+
uuid.bios =
49+
ethernet0.generatedAddress =
50+
ethernet0.generatedAddressOffset =
51+
52+
vcenter debug services:
53+
service-control --stop --all
54+
service-control --start --all

mbx

+15-7
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ list() {
8282
echo -e "$vm\t$ip\t$url"
8383
if [[ $vm == *vmw-host1* ]]; then
8484
vcip=$(sshpass -p 'P@ssword123' ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" root@$vm vim-cmd "vmsvc/get.guest 1 | grep ipAddress | head -1 | sed 's/.*ipAddress = \"//g' | sed 's/\".*//g'" 2> /dev/null) || true
85-
echo -e "vCenter Server\t\t\t\t$vcip\thttps://$vcip/"
85+
echo -e "vCenter Server\t\t\t$vcip\thttps://$vcip/"
8686
fi
8787
done
8888
echo
@@ -289,8 +289,13 @@ deploy() {
289289
if [[ "$hypervisor" == "vmw" && "$box" == "$env-host1" ]]; then
290290
sleep 30
291291
vcmac=$( (date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{4}).*$/\1/;s/([0-9a-f]{2})/\1:/g;s/^/00:50:56:00:/;s/:$//' )
292-
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC/VC.vmx"
293-
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC/VC.vmx"
292+
if [[ "$hyt" == "mbxt-vmware67u3" ]]; then
293+
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC67/VC67.vmx" || true
294+
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC67/VC67.vmx" || true
295+
else
296+
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC/VC.vmx" || true
297+
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC/VC.vmx" || true
298+
fi
294299
issh root@$box vim-cmd vmsvc/getallvms
295300
issh root@$box vim-cmd vmsvc/power.on 1
296301
echo "VC started"
@@ -325,7 +330,7 @@ deploy() {
325330
issh root@$msip yum reinstall -y python3-pip
326331
issh root@$msip "pip3 install --upgrade pip && pip3 install --ignore-installed netaddr mysql-connector-python==8.0.20" || true
327332
issh root@$msip "pip2 install --upgrade pip && pip2 install --ignore-installed netaddr mysql-connector-python==8.0.20" || true
328-
issh root@$msip yum install -y cloudstack-management cloudstack-usage cloudstack-common cloudstack-integration-tests cloudstack-marvin
333+
issh root@$msip yum install -y cloudstack-management cloudstack-usage cloudstack-common cloudstack-integration-tests cloudstack-marvin tar
329334
issh root@$msip "cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root: -i $msip"
330335
issh root@$msip "mysql -u root --execute=\"INSERT INTO cloud.configuration (category, instance, component, name, value) VALUES ('Advanced', 'DEFAULT', 'management-server', 'integration.api.port', '8096');\""
331336
issh root@$msip cloudstack-setup-management
@@ -522,9 +527,12 @@ dev() {
522527
# VMware: Start VC
523528
if [[ "$hypervisor" == "vmw" && "$box" == "$env-host1" ]]; then
524529
vcmac=$( (date; cat /proc/interrupts) | md5sum | sed -r 's/^(.{4}).*$/\1/;s/([0-9a-f]{2})/\1:/g;s/^/00:0c:29:e1:/;s/:$//' )
525-
if [[ "$hyt" == "mbxt-vmware70u1" ]]; then
526-
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC/VC.vmx"
527-
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC/VC.vmx"
530+
if [[ "$hyt" == "mbxt-vmware67u3" ]]; then
531+
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC67/VC67.vmx" || true
532+
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC67/VC67.vmx" || true
533+
else
534+
issh root@$box "echo 'ethernet0.addressType = \"static\"' >> /vmfs/volumes/datastore1/VC/VC.vmx" || true
535+
issh root@$box "echo 'ethernet0.address = \"${vcmac}\"' >> /vmfs/volumes/datastore1/VC/VC.vmx" || true
528536
fi
529537
issh root@$box vim-cmd vmsvc/getallvms
530538
issh root@$box vim-cmd vmsvc/power.on 1

monkeynet.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<network>
22
<name>monkeynet</name>
33
<forward mode='nat'/>
4-
<bridge name='virbr1' stp='on' delay='0'/>
4+
<bridge name='virbr1' stp='off' delay='0'/>
55
<ip address='172.20.0.1' netmask='255.255.0.0'>
66
<dhcp>
77
<range start='172.20.0.50' end='172.20.0.254'/>

templates/md5sum.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
879b98eaaa1f3288b86e5f2b6cf55363 kvm-el7.qcow2
22
4f5d49a16755e3ac787e77dab6a66f39 kvm-el8.qcow2
3+
1e52381c3f0f5a1f91a79c0e3a9edc22 vmware67u3.qcow2
34
5a99f8ebd4000e37f495204148bbb1d5 vmware7.qcow2
45
6f18d8157f5bc7105aba7ac4753d6c38 vmware8.qcow2
56
ddb5a5c3110d58c931af2d12dd4ee756 xcpng82.qcow2

0 commit comments

Comments
 (0)