Облачная операционная система OpenStack. Часть 3. Сервис хранения образов OpenStack Image Service Андрей Маркелов # source keystonerc_admin # keystone user-create --name glance --pass openstack # keystone user-role-add --user glance --tenant service --role admin # keystone service-create --name glance --type image --description "OpenStack Image Service" # keystone endpoint-create --service-id 6a35c051d3f44cdfba24e0598e9b0152 --publicurl http://os1.test.local:9292 --internalurl http://os1.test.local:9292 --adminurl http://os1.test.local:9292 # yum -y install openstack-glance # openstack-db --init --service glance # crudini --set /etc/glance/glance-registry.conf DEFAULT sql_connection mysql://glance:glance@127.0.0.1/glance # crudini --set /etc/glance/glance-api.conf paste_deploy flavor keystone # crudini --set /etc/glance/glance-api.conf keystone_authtoken admin_tenant_name services # crudini --set /etc/glance/glance-api.conf keystone_authtoken admin_user glance # crudini --set /etc/glance/glance-api.conf keystone_authtoken admin_password openstack # crudini --set /etc/glance/glance-registry.conf paste_deploy flavor keystone # crudini --set /etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name service # crudini --set /etc/glance/glance-registry.conf keystone_authtoken admin_user glance # crudini --set /etc/glance/glance-registry.conf keystone_authtoken admin_password openstack # crudini --set /etc/glance/glance-api.conf DEFAULT rabbit_password openstack # crudini --set /etc/glance/glance-api.conf DEFAULT rabbit_userid guest # crudini --set /etc/glance/glance-api.conf DEFAULT rabbit_host localhost # systemctl start openstack-glance-registry # systemctl enable openstack-glance-registry # systemctl start openstack-glance-api # systemctl enable openstack-glance-api # wget -P /tmp http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img # qemu-img info /tmp/cirros-0.3.3-x86_64-disk.img # glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress # ls -l /var/lib/glance/images/ # ls -l /var/lib/glance/images/ ----------------------------------------------------------------------------------------------------------------- Проект FOSSIL. Инструмент коллективной работы над проектами Игорь Орещенков fossil init D:\FOSSIL\www.fossil fossil open D:\FOSSIL\www.fossil fossil add fossil commit -m "Первоначальный вариант" fossil status fossil extra fossil addremove fossil commit -m "Добавлен значок сайта и прайс-лист" fossil revert company/price.html fossil ui -port 8081 fossil commit -m "[f687085141] Добавлена диаграмма" fossil server -port 8081 www.fossil fossil clone http://user:password@server.local.domain:8081 www.fossil fossil open D:\MYFOSSIL\www.fossil fossil update trunk fossil commit -m "Описание выполненных изменений" fossil merge fossil commit --allow-conflict -m "Объединение изменений" ----------------------------------------------------------------------------------------------------------------- Active Directory и безопасности. Часть 9. Аудит службы каталога Active Directory Степан Москалев auditpol /list /subcategory:* Get-EventLog security | ?{$_.eventid -eq 4720} ----------------------------------------------------------------------------------------------------------------- Причины не эффективности SQL-запросов в Oracle. Оптимизация производительности SQL-запросов Валерий Михеичев Select * from TABLE(DBMS_WORKLOAD_REPOSITORY.AWR_REPORT_TEXT((select dbid from V$DATABASE), 1, (select max(snap_id)-1 from sys.WRM$_SNAPSHOT), (select max(snap_id) from sys.WRM$_SNAPSHOT))); execute DBMS_STATS.GATHER_TABLE_STATS ('HIS', 'AGREEMENT', NULL, N, NULL,'FOR ALL INDEXED COLUMNS SIZE AUTO', 4); execute DBMS_STATS.GATHER_INDEX_STATS('HIS', 'X_AGREEMENT', NULL, N, NULL, NULL, 4); Select owner, table_name, round(d.sample_size/decode(d.num_rows,0,100000000000,d.num_rows)*100,2) proch,d.last_analyzed from all_tables d where owner='HIS' and table_name = 'AGREEMENT'; Select owner, table_name, index_name, round(sample_size*100/nvl(decode(num_rows,0,100000,num_rows),1000000),2) pr, last_analyzed from All_ind_statistics d where owner='HIS' and table_name = 'AGREEMENT'; execute dbms_stats.lock_table_stats('имя схемы','имя таблицы'); execute dbms_stats.unlock_table_stats('имя схемы','имя таблицы'); ALTER INDEX ИМЯ СХЕМЫ.ИМЯ ИНДЕКСА REBUILD ONLINE) OPT_PARAM('_optim_peek_user_binds' 'false') /*+ opt_param('Параметр инициализацци' N) */ /*+ opt_param('optimizer_index_caching' 1) */ ----------------------------------------------------------------------------------------------------------------- «1С:Предприятие» вместе с «1С-Битрикс». Часть 8. Типовые проблемы и методы их решения Игорь Чуфаров RewriteEngine on RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L] # # RewriteEngine Off # $remote_user = $_SERVER["REMOTE_USER"] ? $_SERVER["REMOTE_USER"] : $_SERVER["REDIRECT_REMOTE_USER"]; $strTmp = base64_decode(substr($remote_user,6)); if ($strTmp) list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':', $strTmp); 'Y); CCatalogProduct::Update($ID,$res); } ?> ----------------------------------------------------------------------------------------------------------------- Использование VCS для обновления и поддержки веб-сайтов Дмитрий Пошехонов $ cd ~/www # директория сайта $ git init # инициализация репозитория $ git add . # добавление содержимого $ git commit -m "first commit of site files" # первая ревизия $ cd .. $ mkdir repo1.git # каталог для нового репозитория $ cd repo1.git $ git --bare init # инициализация bare-репозитория $ cd ~/www $ git remote add repo1 ~/repo1.git # добавление удаленного репозитория $ git push hub master cd $HOME/www || exit unset GIT_DIR # очистка переменной GIT_DIR git pull hub master # извлечение данных из основной ветви exec git-update-server-info # обновление рабочих файлов git push hub ----------------------------------------------------------------------------------------------------------------- Генерируем PDF-отчеты о тестировании веб-приложений в Selenium Анна Сергеева @Listeners(JyperionListener.class) public class PDFReportGen { } -----------------------------------------------------------------------------------------------------------------