File tree Expand file tree Collapse file tree 4 files changed +31
-1
lines changed
Expand file tree Collapse file tree 4 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 184184 user = "nova" ;
185185 } ;
186186 } ;
187+ "/etc/systemd/system/tgtd.service" = {
188+ "C+" = {
189+ user = "root" ;
190+ group = "root" ;
191+ mode = "0600" ;
192+ argument = "${ pkgs . tgt } /etc/systemd/system/tgtd.service" ;
193+ } ;
194+ } ;
187195 } ;
188196 } ;
189197
198+ services . openiscsi = {
199+ enable = true ;
200+ name = "iqn.iscsi.${ config . networking . hostName } " ;
201+ } ;
202+
203+ environment . systemPackages = [ pkgs . tgt ] ;
204+
190205 systemd . services . nova-compute = {
191206 description = "OpenStack Nova Scheduler Daemon" ;
192207 after = [
200215 sudo
201216 nova_env
202217 qemu
218+ util-linux
219+ lvm2
220+ tgt
203221 ]
204222 ++ cfg . extraPkgs ;
205223 environment . PYTHONPATH = "${ nova_env } /${ pkgs . python3 . sitePackages } " ;
Original file line number Diff line number Diff line change 1616 transport_url = rabbit://openstack:openstack@controller
1717 auth_strategy = keystone
1818 my_ip = controller
19+ verify_glance_signatures = disabled
1920
2021 [database]
2122 connection = mysql+pymysql://cinder:cinder@controller/cinder
Original file line number Diff line number Diff line change 5151 state_path = /var/lib/cinder
5252 rootwrap_config = ${ rootwrapConf }
5353 glance_api_servers = http://controller:9292
54+ verify_glance_signatures = disabled
5455
5556 [database]
5657 connection = mysql+pymysql://cinder:cinder@controller/cinder
7475 volume_group = cinder-volumes
7576 volume_backend_name = lvm
7677 lvm_type = default
78+ target_protocol = iscsi
7779 '' ;
7880in
7981{
181183 path = with pkgs ; [
182184 cinder_env
183185 lvm2
186+ tgt
187+ qemu-utils
184188 # sudo must be in the path and only sudo in /run/wrappers has the
185189 # correct owner and rights
186190 "/run/wrappers"
187191 ] ;
192+ environment . PYTHONPATH = "${ cinder_env } /${ pkgs . python3 . sitePackages } " ;
188193 wantedBy = [ "multi-user.target" ] ;
189194 serviceConfig = {
190195 User = "cinder" ;
Original file line number Diff line number Diff line change 4747 url = "https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img" ;
4848 hash = "sha256-B+RKc+VMlNmIAoUVQDwe12IFXgG4OnZ+3zwrOH94zgA=" ;
4949 } ;
50+ image_raw = pkgs . runCommand "" { } ''
51+ ${ pkgs . qemu-utils } /bin/qemu-img convert -O raw ${ image } $out
52+ '' ;
5053 in
5154 {
5255 imports = [ common ] ;
8689 --dns-nameserver 8.8.4.4 --gateway 192.168.44.1 \
8790 --subnet-range 192.168.44.0/24 provider
8891
89- openstack image create --disk-format qcow2 --container-format bare --public --file ${ image } cirros
92+ openstack image create --disk-format raw --container-format bare --public --file ${ image_raw } cirros
9093 openstack flavor create --public m1.nano --id auto --ram 256 --disk 0 --vcpus 1
94+ openstack volume qos create --consumer "front-end" --property "total_iops_sec=20000" iops
95+ openstack volume qos associate iops __DEFAULT__
96+ openstack volume create --image cirros --size 1 --bootable vol
9197
9298 openstack security group rule create --proto icmp default
9399 openstack security group rule create --proto tcp --dst-port 22 default
You can’t perform that action at this time.
0 commit comments