File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 189189 user = "nova" ;
190190 } ;
191191 } ;
192+ "/etc/systemd/system/tgtd.service" = {
193+ "C+" = {
194+ user = "root" ;
195+ group = "root" ;
196+ mode = "0600" ;
197+ argument = "${ pkgs . tgt } /etc/systemd/system/tgtd.service" ;
198+ } ;
199+ } ;
192200 } ;
193201 } ;
194202
203+ services . openiscsi = {
204+ enable = true ;
205+ name = "iqn.iscsi.${ config . networking . hostName } " ;
206+ } ;
207+
208+ environment . systemPackages = [ pkgs . tgt ] ;
209+
195210 systemd . services . nova-compute = {
196211 description = "OpenStack Nova Scheduler Daemon" ;
197212 after = [
205220 sudo
206221 nova_env
207222 qemu
223+ util-linux
224+ lvm2
225+ tgt
208226 ]
209227 ++ cfg . extraPkgs ;
210228 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 9393 url = "https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img" ;
9494 hash = "sha256-B+RKc+VMlNmIAoUVQDwe12IFXgG4OnZ+3zwrOH94zgA=" ;
9595 } ;
96+ image_raw = pkgs . runCommand "" { } ''
97+ ${ pkgs . qemu-utils } /bin/qemu-img convert -O raw ${ image } $out
98+ '' ;
9699 in
97100 {
98101 imports = [
135138 --dns-nameserver 8.8.4.4 --gateway 192.168.44.1 \
136139 --subnet-range 192.168.44.0/24 provider
137140
138- openstack image create --disk-format qcow2 --container-format bare --public --file ${ image } cirros
141+ openstack image create --disk-format raw --container-format bare --public --file ${ image_raw } cirros
139142 openstack flavor create --public m1.nano --id auto --ram 256 --disk 0 --vcpus 1
143+ openstack volume qos create --consumer "front-end" --property "total_iops_sec=20000" iops
144+ openstack volume qos associate iops __DEFAULT__
145+ openstack volume create --image cirros --size 1 --bootable vol
140146
141147 openstack security group rule create --proto icmp default
142148 openstack security group rule create --proto tcp --dst-port 22 default
You can’t perform that action at this time.
0 commit comments