Skip to content

Instantly share code, notes, and snippets.

View carmark's full-sized avatar

Lei Xue carmark

  • Beijing, China
View GitHub Profile
{
"id": "test-ubuntu-interface",
"containers" : [{
"name": "ubuntu-interface",
"image": "ubuntu:latest",
"workdir": "/",
"command": ["/bin/bash"],
"files": [{
"filename": "resolv.conf",
"path": "/etc/",

This document describes how to install Keystone in order to use it. If you are intending to develop on or with Keystone, please read Developing with Keystone and Setting up a Keystone development environment.

Installing from Source

The source install instructions specifically avoid using platform specific packages, instead using the source for the code and the Python Package Index (PyPi).

It’s expected that your system already has python, pip, and git available.

Clone the Keystone repository:

You need to install the keystone and kubernetes on your system(Linux).

  • keystone

    • You may use apt-get or yum to install the keystone from public source
    • Or build it from the source code, refer here
  • kubernetes

    • You have to build it from source code, since there are some diffs between our code and the upstream. The changes are
  • update gophercloud dependency Update the dependency of gophercloud which is a openstack client for golang

lei@ubuntu:~/src/k8s.io/kubernetes$ curl -i -k -X POST http://127.0.0.1:8080/api/v1/tenants -d "$(cat /tmp/my-tenant.json)"
HTTP/1.1 201 Created
Content-Type: application/json
Date: Mon, 19 Oct 2015 07:26:16 GMT
Content-Length: 385

{
  "kind": "Tenant",
  "apiVersion": "v1",
=== RUN   TestUserTestAccess
W1027 16:50:18.637567   60648 master.go:346] Network range for service cluster IPs is unspecified. Defaulting to 10.0.0.0/24.
I1027 16:50:18.637892   60648 master.go:372] Node port range unspecified. Defaulting to 30000-32767.
I1027 16:50:18.638683   60648 master.go:394] Will report 172.16.69.161 as public IP address.
W1027 16:50:18.669720   60648 controller.go:269] Resetting endpoints for master service "kubernetes" to &{{ } {kubernetes  default default    0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[]} [{[{172.16.69.161 <nil>}] [] [{ 6443 TCP}]}]}
I1027 16:50:32.040330   60648 <autogenerated>:1] Error getting ResourceLocation: no endpoints available for service "a"
--- PASS: TestUserTestAccess (19.81s)
	auth_keystone_test.go:359: access /api/v1/tenants with POST
	auth_keystone_test.go:359: access /api/v1/namespaces/default/pods with GET
Only in lib/glog/: convenient_api.go
Only in /home/lei/src/github.com/golang/glog: .git
diff -bur /home/lei/src/github.com/golang/glog/glog_file.go lib/glog/glog_file.go
--- /home/lei/src/github.com/golang/glog/glog_file.go 2015-10-20 21:42:19.825139152 +0800
+++ lib/glog/glog_file.go 2015-09-23 20:32:27.913525822 +0800
@@ -43,8 +43,13 @@
func createLogDirs() {
if *logDir != "" {
logDirs = append(logDirs, *logDir)
- }

list or watch objects of kind User

GET /oapi/v1/users

PARAMETERS

Type Name Description Required Schema Default
QueryParameter pretty If 'true', then the output is pretty printed. false string
QueryParameter labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything. false string
I0107 14:35:05.018522 46843 info.go:220] unlock read of PodList
I0107 14:35:05.018544 46843 job.go:84] -job podInfo(pod-mcrhiOwqHy) OK
I0107 14:35:05.019006 46843 info.go:220] unlock read of PodList
I0107 14:35:05.019022 46843 job.go:84] -job podInfo(pod-mcrhiOwqHy) OK
I0107 14:35:05.020839 46843 server.go:1050] Calling GET /list
I0107 14:35:05.020887 46843 server.go:191] List type is pod, specified pod: [], specified vm: [], list auxiliary pod:
I0107 14:35:05.020902 46843 job.go:78] +job list(pod, , , )
I0107 14:35:05.020909 46843 list.go:50] lock read of PodList
I0107 14:35:05.020939 46843 list.go:142] unlock read of PodList
I0107 14:35:05.020944 46843 job.go:84] -job list(pod, , , ) OK
@carmark
carmark / check.md
Last active February 2, 2016 07:02
  • create

    • size for container inspect
    • [TBD] should the unamed empty volume for container be persist?
    • not all resource and isolation/security options are allowed
    • [TBD] should we shipped share-ns solution in the first release?
    • [TBD] how to set vCPUs, or should we assign only one CPU if cpuset options are not specified
    • should we provide a new log driver to collect log, or rely on k8s?
  • delete

  • if container is running, add '--rm' to database and stop it in k8s
[root@h8s-single lei]# head -n 152 /var/log/hyper/hyperd.INFO
Log file created at: 2016/02/21 17:08:59
Running on machine: h8s-single
Binary: Built with gc go1.6 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0221 17:08:59.904604 98239 hyperd.go:106] The config file is
I0221 17:08:59.905754 98239 docker.go:60] success to create docker
I0221 17:08:59.906291 98239 daemon.go:200] The config: kernel=/var/lib/hyper/kernel, initrd=/var/lib/hyper/hyper-initrd.img
I0221 17:08:59.906357 98239 daemon.go:202] The config: vbox image=
I0221 17:08:59.906376 98239 daemon.go:205] The config: bridge=, ip=