diff --git a/docker/docker.md b/docker/docker.md index ae28607..d43ede8 100644 --- a/docker/docker.md +++ b/docker/docker.md @@ -53,3 +53,13 @@ reboot # or relogin ``` + + + +```bash +sudo apt install docker.io +sudo systemctl start docker +sudo systemctl enable docker +sudo adduser $USER docker + +``` diff --git a/docker/gitlite.md b/docker/gitlite.md new file mode 100644 index 0000000..0923a92 --- /dev/null +++ b/docker/gitlite.md @@ -0,0 +1,8 @@ +# normal + +## add git user + +```bash +useradd -ms /bin/bash git + +``` diff --git a/openstack/docker.md b/openstack/docker.md new file mode 100644 index 0000000..f70fdfa --- /dev/null +++ b/openstack/docker.md @@ -0,0 +1,7 @@ +# deploy with docker + + +```bash +docker run -dit --privileged --cap-add=ALL --network=host --name=controller -h controller -v /lib/modules:/lib/modules openstack_base:rocky_ovs +docker run -dit --privileged --cap-add=ALL --network=host --name=compute -h compute -v /lib/modules:/lib/modules openstack_compute:rocky_ovs +``` diff --git a/openstack/ovs.md b/openstack/ovs.md new file mode 100644 index 0000000..48c08c4 --- /dev/null +++ b/openstack/ovs.md @@ -0,0 +1,21 @@ +# open vswitch + +## install + + +```bash +git clone https://github.com/openvswitch/ovs.git +cd ovs +git checkout v2.7.0 +sudo apt-get install git autoconf automake libtool openssl libssl-dev make python-six -y + +./boot.sh + +./configure + +make + +sudo make install + +sudo modprobe openvswitch +``` diff --git a/vim/ycm_extra_conf.py b/vim/ycm_extra_conf.py index 77a6223..2bc0a2b 100644 --- a/vim/ycm_extra_conf.py +++ b/vim/ycm_extra_conf.py @@ -34,9 +34,9 @@ import os import subprocess import ycm_core -project_path = os.path.abspath(os.path.dirname(__file__)) -DIR_OF_THIS_SCRIPT = "/home/light/.vim/bundle/YouCompleteMe" -DIR_OF_THIRD_PARTY = os.path.join(DIR_OF_THIS_SCRIPT, 'third_party') +# DIR_OF_THIS_SCRIPT = "/home/light/.vim/bundle/YouCompleteMe/third_party/ycmd" +# DIR_OF_THIRD_PARTY = os.path.join(DIR_OF_THIS_SCRIPT, 'third_party') +DIR_OF_THIS_SCRIPT = os.path.abspath(os.path.dirname(__file__)) SOURCE_EXTENSIONS = ['.cpp', '.cxx', '.cc', '.c', '.m', '.mm'] # These are the compilation flags that will be used in case there's no @@ -60,34 +60,12 @@ flags = [ # For a C project, you would set this to 'c' instead of 'c++'. '-x', 'c++', - '-isystem', - 'cpp/pybind11', - '-isystem', - 'cpp/BoostParts', - '-isystem', - get_python_inc(), - '-isystem', - 'cpp/llvm/include', - '-isystem', - 'cpp/llvm/tools/clang/include', '-I', - 'cpp/ycm', + '/usr/include', + '-isystem', + 'includes', '-I', - 'cpp/ycm/ClangCompleter', - '-isystem', - 'cpp/ycm/tests/gmock/gtest', - '-isystem', - 'cpp/ycm/tests/gmock/gtest/include', - '-isystem', - 'cpp/ycm/tests/gmock', - '-isystem', - 'cpp/ycm/tests/gmock/include', - '-isystem', - 'cpp/ycm/benchmarks/benchmark/include', - '-isystem', - project_path + '/includes', - '-I', - project_path + '/src', + 'src', ] # Clang automatically sets the '-std=' flag to 'c++14' for MSVC 2015 or later, @@ -202,21 +180,4 @@ def PythonSysPath(**kwargs): sys_path.insert(0, DIR_OF_THIS_SCRIPT) - for folder in os.listdir(DIR_OF_THIRD_PARTY): - if folder == 'python-future': - folder = os.path.join(folder, 'src') - sys_path.insert(GetStandardLibraryIndexInSysPath(sys_path) + 1, - os.path.realpath(os.path.join(DIR_OF_THIRD_PARTY, - folder))) - continue - - if folder == 'cregex': - interpreter_path = kwargs['interpreter_path'] - major_version = subprocess.check_output([ - interpreter_path, '-c', 'import sys; print( sys.version_info[ 0 ] )'] - ).rstrip().decode('utf8') - folder = os.path.join(folder, 'regex_{}'.format(major_version)) - - sys_path.insert(0, os.path.realpath(os.path.join(DIR_OF_THIRD_PARTY, - folder))) return sys_path