https://d0.awsstatic.com/events/jp/2017/summit/slide/D2T3-5.pdf
Create VM in OpenStack Ocata.
After these,
Install OpenStack Ocata by Packstack on CentOS 7. - AKAI TSUKI
Check openstack service. - AKAI TSUKI
image
# openstack image list +--------------------------------------+--------+--------+ | ID | Name | Status | +--------------------------------------+--------+--------+ | b5e892b7-c8a5-44fc-83a7-5cafc43dabf8 | cirros | active | +--------------------------------------+--------+--------+ #
network
# openstack network list +--------------------------------------+---------+--------------------------------------+ | ID | Name | Subnets | +--------------------------------------+---------+--------------------------------------+ | b2e1df72-d4cb-4474-ab9e-cb2d7c5acd1b | public | 71ba8757-ca92-40c2-b85a-2dd5dc6d58c1 | | cf8a77e6-2063-4db3-8fc9-a0c22c82a6b7 | private | c6db71fa-185b-4da9-bacc-31ae7e3a7f50 | +--------------------------------------+---------+--------------------------------------+ #
flavor
# openstack flavor list +----+-----------+-------+------+-----------+-------+-----------+ | ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public | +----+-----------+-------+------+-----------+-------+-----------+ | 1 | m1.tiny | 512 | 1 | 0 | 1 | True | | 2 | m1.small | 2048 | 20 | 0 | 1 | True | | 3 | m1.medium | 4096 | 40 | 0 | 2 | True | | 4 | m1.large | 8192 | 80 | 0 | 4 | True | | 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True | +----+-----------+-------+------+-----------+-------+-----------+ #
create server
# openstack server create --image cirros --flavor m1.tiny --nic net-id=cf8a77e6-2063-4db3-8fc9-a0c22c82a6b7 sample-vm *snip* # openstack server list +--------------------------------------+-----------+--------+------------------+------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+-----------+--------+------------------+------------+ | 7f61abf8-c070-4968-b1ab-4c3222eaff77 | sample-vm | ACTIVE | private=10.0.0.8 | cirros | +--------------------------------------+-----------+--------+------------------+------------+ #
Check openstack service.
After installation, Install OpenStack Ocata by Packstack on CentOS 7. - AKAI TSUKI
Let’s check status by openstack client command.
Service
# openstack service list +----------------------------------+-----------+-----------------+ | ID | Name | Type | +----------------------------------+-----------+-----------------+ | 00cfb41acb0543c1bec827a341917781 | cinder | volume | | 02496e0b13b3489290d71bdfe454b1d6 | cinderv3 | volumev3 | | 07a3c644cdfd49ebb85cf3f591d4837e | heat-cfn | cloudformation | | 33a030563e6f45c8b9e8569036f47a0c | nova | compute | | 39910fbcda6e4b37aee01557352895dc | placement | placement | | 56592739630f4686adabac81a4e2abb4 | heat | orchestration | | 7ed8c0e762394c4abd0bfc30a28b581f | keystone | identity | | 8200ecbba50f450895c01406f0f49c88 | neutron | network | | b21cd3fc394d46d5a20704a5026f36d1 | cinderv2 | volumev2 | | e6678c6d48f64c3596858222572d4ba6 | magnum | container-infra | | f9096b93a1ed4694b97cccdb5b7ff1d3 | glance | image | +----------------------------------+-----------+-----------------+ #
Endpoint
# openstack endpoint list +----------------------------------+-----------+--------------+-----------------+---------+-----------+---------------------------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+-----------------+---------+-----------+---------------------------------------------+ | 0a944f017b25431780663cbe044f4454 | RegionOne | heat-cfn | cloudformation | True | internal | http://172.16.10.25:8000/v1 | | 0ed7175134a742aead8a9f85e0ee6210 | RegionOne | placement | placement | True | internal | http://172.16.10.25:8778/placement | | 14c99551bf7a4c46909ca5491e918458 | RegionOne | heat | orchestration | True | public | http://172.16.10.25:8004/v1/%(tenant_id)s | | 191b140b64554f83a3add20100859c46 | RegionOne | heat | orchestration | True | admin | http://172.16.10.25:8004/v1/%(tenant_id)s | | 38a66ef6d2f54f049aee4613bc95b13c | RegionOne | nova | compute | True | admin | http://172.16.10.25:8774/v2.1/%(tenant_id)s | | 41344a0fbaa546d48afed810a7ca5861 | RegionOne | cinderv2 | volumev2 | True | internal | http://172.16.10.25:8776/v2/%(tenant_id)s | | 4317cb47b64c44628152c47d190f714b | RegionOne | cinder | volume | True | public | http://172.16.10.25:8776/v1/%(tenant_id)s | | 4ada9ce8f21a445888f326bd29794137 | RegionOne | neutron | network | True | public | http://172.16.10.25:9696 | | 4c074c23d20d469b99344dadb2143e7b | RegionOne | glance | image | True | internal | http://172.16.10.25:9292 | | 547d143948b348d48ef4ebbe7fcc2052 | RegionOne | cinder | volume | True | internal | http://172.16.10.25:8776/v1/%(tenant_id)s | | 553e8689f41744a5a6a1944193950748 | RegionOne | glance | image | True | public | http://172.16.10.25:9292 | | 5e978da9ce004fbebe739873d69d2a93 | RegionOne | cinderv2 | volumev2 | True | public | http://172.16.10.25:8776/v2/%(tenant_id)s | | 77dbb5f4c4bb45a5b7158751fbe75e4d | RegionOne | cinder | volume | True | admin | http://172.16.10.25:8776/v1/%(tenant_id)s | | 7dc9631444424a4d957b6b65022ec97c | RegionOne | cinderv3 | volumev3 | True | admin | http://172.16.10.25:8776/v3/%(tenant_id)s | | 92a6343ef5634fb5a7b27813dc5c779d | RegionOne | keystone | identity | True | internal | http://172.16.10.25:5000/v3 | | 984d1b2676504988a11fd4c23b5cb87f | RegionOne | heat | orchestration | True | internal | http://172.16.10.25:8004/v1/%(tenant_id)s | | 9f30088714574594abbdb4b86f9bfb5f | RegionOne | neutron | network | True | internal | http://172.16.10.25:9696 | | a953d12487004364b63c0f1f63edd5a7 | RegionOne | magnum | container-infra | True | admin | http://172.16.10.25:9511/v1 | | adc7090bc7594f089b1bb83e3e1545b0 | RegionOne | magnum | container-infra | True | internal | http://172.16.10.25:9511/v1 | | af5830eba102465c83955f681b190a4b | RegionOne | heat-cfn | cloudformation | True | admin | http://172.16.10.25:8000/v1 | | af77088b57834b98b42253efd9ae232d | RegionOne | glance | image | True | admin | http://172.16.10.25:9292 | | beb3c9e5bb81407098dfe641dcc153c8 | RegionOne | nova | compute | True | internal | http://172.16.10.25:8774/v2.1/%(tenant_id)s | | c1abbfc4a47048c6b6f0e2886e35ca9e | RegionOne | keystone | identity | True | admin | http://172.16.10.25:35357/v3 | | c41fc831fadd4801947c428488213041 | RegionOne | magnum | container-infra | True | public | http://172.16.10.25:9511/v1 | | c807e5d21e244bfc9514a2e1e6e8418c | RegionOne | neutron | network | True | admin | http://172.16.10.25:9696 | | dbfbd247fd374b23956cb076b5e8adf3 | RegionOne | nova | compute | True | public | http://172.16.10.25:8774/v2.1/%(tenant_id)s | | df635a3c187b430da60f25403491c2f0 | RegionOne | cinderv3 | volumev3 | True | public | http://172.16.10.25:8776/v3/%(tenant_id)s | | e0ba54c694414b348921ab97dff71e41 | RegionOne | placement | placement | True | public | http://172.16.10.25:8778/placement | | e3891bbfdf9b4d8fa8c5176ec57df4f8 | RegionOne | keystone | identity | True | public | http://172.16.10.25:5000/v3 | | f2ee2198609a40f1959cf62e9ff34c2c | RegionOne | heat-cfn | cloudformation | True | public | http://172.16.10.25:8000/v1 | | f9bf7032b55d4057adb479e5c8a71218 | RegionOne | cinderv2 | volumev2 | True | admin | http://172.16.10.25:8776/v2/%(tenant_id)s | | fa0268f4b061455db82c21f1051454f8 | RegionOne | cinderv3 | volumev3 | True | internal | http://172.16.10.25:8776/v3/%(tenant_id)s | | ffa7ec15d72a4a8aa28cbe2650012ee4 | RegionOne | placement | placement | True | admin | http://172.16.10.25:8778/placement | +----------------------------------+-----------+--------------+-----------------+---------+-----------+---------------------------------------------+ #
Host
# openstack host list +-----------+-------------+----------+ | Host Name | Service | Zone | +-----------+-------------+----------+ | cent7op | cert | internal | | cent7op | conductor | internal | | cent7op | scheduler | internal | | cent7op | consoleauth | internal | | cent7op | compute | nova | +-----------+-------------+----------+ #
Hypervisor
# openstack hypervisor list +----+---------------------+-----------------+--------------+-------+ | ID | Hypervisor Hostname | Hypervisor Type | Host IP | State | +----+---------------------+-----------------+--------------+-------+ | 1 | cent7op | QEMU | 172.16.10.25 | up | +----+---------------------+-----------------+--------------+-------+ #
Install OpenStack Ocata by Packstack on CentOS 7.
Reference
sample answer file
# cat packstack-answers.txt | grep -v "^#" | grep "_INSTALL" CONFIG_MARIADB_INSTALL=y CONFIG_GLANCE_INSTALL=y CONFIG_CINDER_INSTALL=y CONFIG_MANILA_INSTALL=n CONFIG_NOVA_INSTALL=y CONFIG_NEUTRON_INSTALL=y CONFIG_HORIZON_INSTALL=y CONFIG_SWIFT_INSTALL=n CONFIG_CEILOMETER_INSTALL=n CONFIG_AODH_INSTALL=n CONFIG_GNOCCHI_INSTALL=n CONFIG_PANKO_INSTALL=n CONFIG_SAHARA_INSTALL=n CONFIG_HEAT_INSTALL=y CONFIG_MAGNUM_INSTALL=y CONFIG_TROVE_INSTALL=n CONFIG_IRONIC_INSTALL=n CONFIG_CLIENT_INSTALL=y CONFIG_NAGIOS_INSTALL=n CONFIG_LBAAS_INSTALL=n CONFIG_NEUTRON_METERING_AGENT_INSTALL=y CONFIG_HEAT_CLOUDWATCH_INSTALL=n CONFIG_HEAT_CFN_INSTALL=y #
start to deploy openstack by packstack.
# packstack --answer-file=./packstack-answers.txt Welcome to the Packstack setup utility *snip* **** Installation completed successfully ****** Additional information: * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components. * File /root/keystonerc_admin has been created on OpenStack client host 172.16.10.25. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://172.16.10.25/dashboard . Please, find your login credentials stored in the keystonerc_admin in your home directory. * The installation log file is available at: /var/tmp/packstack/20170601-001722-d5TnAF/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20170601-001722-d5TnAF/manifests #
Using Git repository on GitLab.
After preparing:
git clone
$ git clone http://username01@172.16.10.25/testgrp/testpj.git Cloning into 'testpj'... warning: You appear to have cloned an empty repository. $ ls testpj $ cd testpj/
setting user info:
$ git config user.name username01 $ git config user.email <mail address>
prepare sample file “README.md”
$ vi README.md $ cat README.md Test Message: hello Gitlab! $
git commit and push
$ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: README.md no changes added to commit (use "git add" and/or "git commit -a") $ git commit -a -m "test commit" [master 7ee70bd] test commit 1 file changed, 1 insertion(+) $ git push -u origin master Counting objects: 3, done. Writing objects: 100% (3/3), 249 bytes | 0 bytes/s, done. Total 3 (delta 0), reused 0 (delta 0) To http://172.16.10.25/testgrp/testpj.git * [new branch] master -> master Branch master set up to track remote branch master from origin. $
for example:
Prepare group, project and user before using GitLab
After installation:akai-tsuki.hatenablog.com
set pass for root user.
input password of root.
login by root.
1. create Group
2. create PJ
3. create users
4. add member to group
After adding member:
At this point we can not see icon image of added user,
because I don’t change external_url
parameter in /etc/gitlab/gitlab.rb
,
I need to chenage form hostname to ip address for this parameter in my environment.
change external_url
parameter
# cp -p /etc/gitlab/gitlab.rb{,.org} # vi /etc/gitlab/gitlab.rb # diff /etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb.org 13c13 < external_url 'http://172.16.10.25' --- > external_url 'http://gitlab2' # # gitlab-ctl reconfigure Starting Chef Client, version 12.12.15 *snip* Running handlers complete Chef Client finished, 327/438 resources updated in 01 minutes 20 seconds gitlab Reconfigured! #
install GitLab 9.2.2 CE (Omnibus install) on CentOS 7
see: https://about.gitlab.com/downloads/#centos7
summary
# yum update # firewall-cmd --permanent --add-service=http # systemctl reload firewalld # curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash # yum install gitlab-ce # gitlab-ctl reconfigure
prepare
# yum update # firewall-cmd --permanent --add-service=http # systemctl reload firewalld (if you need) # reboot # firewall-cmd --state running # firewall-cmd --list-all public (active) target: default icmp-block-inversion: no interfaces: enp0s3 enp0s8 sources: services: dhcpv6-client http ssh ports: protocols: masquerade: no forward-ports: sourceports: icmp-blocks: rich rules: #
add GitLab package repository setting
# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash Detected operating system as centos/7. *snip* Installed: yum-utils.noarch 0:1.1.31-40.el7 Dependency Installed: libxml2-python.x86_64 0:2.9.1-6.el7_2.3 python-chardet.noarch 0:2.2.1-1.el7_1 python-kitchen.noarch 0:1.1.1-5.el7 Complete! Generating yum cache for gitlab_gitlab-ce... Importing GPG key 0xE15E78F4: Userid : "GitLab B.V. (package repository signing key) <packages@gitlab.com>" Fingerprint: 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4 From : https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey The repository is setup! You can now install packages. # # ls -l /etc/yum.repos.d/gitlab_gitlab-ce.repo -rw-r--r-- 1 root root 571 May 27 15:29 /etc/yum.repos.d/gitlab_gitlab-ce.repo #
install the package
# yum install gitlab-ce Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.nara.wide.ad.jp * extras: ftp.iij.ad.jp * updates: ftp.iij.ad.jp Resolving Dependencies --> Running transaction check ---> Package gitlab-ce.x86_64 0:9.2.2-ce.0.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: gitlab-ce x86_64 9.2.2-ce.0.el7 gitlab_gitlab-ce 311 M Transaction Summary ==================================================================================================== Install 1 Package Total download size: 311 M Installed size: 910 M Is this ok [y/d/N]: y Downloading packages: gitlab-ce-9.2.2-ce.0.el7.x86_64.rpm | 311 MB 00:00:37 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : gitlab-ce-9.2.2-ce.0.el7.x86_64 1/1 *. *. *** *** ***** ***** .****** ******* ******** ******** ,,,,,,,,,***********,,,,,,,,, ,,,,,,,,,,,*********,,,,,,,,,,, .,,,,,,,,,,,*******,,,,,,,,,,,, ,,,,,,,,,*****,,,,,,,,,. ,,,,,,,****,,,,,, .,,,***,,,, ,*,. _______ __ __ __ / ____(_) /_/ / ____ _/ /_ / / __/ / __/ / / __ `/ __ \ / /_/ / / /_/ /___/ /_/ / /_/ / \____/_/\__/_____/\__,_/_.___/ gitlab: Thank you for installing GitLab! gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND: sudo gitlab-ctl reconfigure gitlab: GitLab should be reachable at http://gitlab2 gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file gitlab: And running reconfigure again. gitlab: gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md gitlab: It looks like GitLab has not been configured yet; skipping the upgrade script. Verifying : gitlab-ce-9.2.2-ce.0.el7.x86_64 1/1 Installed: gitlab-ce.x86_64 0:9.2.2-ce.0.el7 Complete! #
configure and start GitLab
# gitlab-ctl reconfigure Starting Chef Client, version 12.12.15 resolving cookbooks for run list: ["gitlab"] Synchronizing Cookbooks: - package (0.0.0) - gitlab (0.0.1) - runit (0.14.2) *snip* Running handlers: Running handlers complete Chef Client finished, 327/438 resources updated in 01 minutes 20 seconds gitlab Reconfigured! #
access by the browser (Chrome)
access to http://<IP address>/