From 04d2c197d934a0b49efd6125ddbea440c88d0a1d Mon Sep 17 00:00:00 2001 From: Yasufumi Ogawa Date: Thu, 9 Nov 2023 14:26:50 +0900 Subject: [PATCH] Update installer for virtualbox/ubuntu-jammy This patch is to fix a lack of required packages for building devstack environment and drop old focal support. * Add pip installation of pbr for ovn-metadata agent and netaddr for kuryr-kubernetes. * Remove boxes and playbooks for focal. Signed-off-by: Yasufumi Ogawa Change-Id: Ie345e50e09a3236d0c2ab9ff1494058bdc6c010b --- vagrant/devstack/README.md | 10 -- vagrant/devstack/Vagrantfile | 6 +- vagrant/devstack/hosts | 6 - vagrant/devstack/lib/machine.rb | 2 +- vagrant/devstack/lib/vagrant_boxes.yml | 13 -- .../ubuntu-focal/compute/tasks/basic_pkgs.yml | 6 - .../ubuntu-focal/compute/tasks/devstack.yml | 15 -- .../roles/ubuntu-focal/compute/tasks/main.yml | 6 - .../compute/templates/local.conf.j2 | 22 --- .../controller/tasks/basic_pkgs.yml | 26 --- .../controller/tasks/devstack.yml | 20 --- .../controller/tasks/extra_tools.yml | 8 - .../controller/tasks/git_config.yml | 4 - .../ubuntu-focal/controller/tasks/main.yml | 26 --- .../ubuntu-focal/controller/tasks/neovim.yml | 22 --- .../tasks/python3_specific_vers.yml | 9 - .../controller/tasks/remove_useless_pkgs.yml | 11 -- .../controller/tasks/set_path_env.yml | 5 - .../controller/tasks/setup_tacker.yml | 65 ------- .../controller/tasks/vim_extra_plugins.yml | 29 ---- .../controller/tasks/vim_latest.yml | 8 - .../controller/templates/vimrc.j2 | 159 ------------------ .../controller/tasks/devstack.yml | 15 +- .../controller/tasks/setup_tacker.yml | 6 - vagrant/devstack/site.yaml | 12 -- 25 files changed, 12 insertions(+), 499 deletions(-) delete mode 100644 vagrant/devstack/lib/vagrant_boxes.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/compute/tasks/basic_pkgs.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/compute/tasks/devstack.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/compute/tasks/main.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/compute/templates/local.conf.j2 delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/basic_pkgs.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/devstack.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/extra_tools.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/git_config.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/main.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/neovim.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/python3_specific_vers.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/remove_useless_pkgs.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/set_path_env.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/setup_tacker.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_extra_plugins.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_latest.yml delete mode 100644 vagrant/devstack/roles/ubuntu-focal/controller/templates/vimrc.j2 diff --git a/vagrant/devstack/README.md b/vagrant/devstack/README.md index c432cf1f2..084c09f2c 100644 --- a/vagrant/devstack/README.md +++ b/vagrant/devstack/README.md @@ -30,16 +30,6 @@ environment. $ vagrant plugin install vagrant-disksize ``` -Here is a list of current supported boxes in this tool. - -* bento/ubuntu-22.04 -* bento/ubuntu-20.04 -* ubuntu/jammy64 -* ubuntu/focal64 -* bento/centos-stream-8 -* centos/stream8 - - ### Configure and Fire Up VMs Before launching VMs with vagrant, configure `machines.yml`, which defines diff --git a/vagrant/devstack/Vagrantfile b/vagrant/devstack/Vagrantfile index bb1063243..d8ad8eb58 100644 --- a/vagrant/devstack/Vagrantfile +++ b/vagrant/devstack/Vagrantfile @@ -23,16 +23,16 @@ machines = Machines.new(vd_config["machines"]) # TODO(yasufum) Test libvirt's boxes can be deployed haven't been tested yet. supported_boxes = { "virtualbox" => { - "ubuntu" => ["bento/ubuntu-20.04", "bento/ubuntu-22.04", "ubuntu/focal64", "ubuntu/jammy64"], + "ubuntu" => ["bento/ubuntu-22.04", "generic/ubuntu2204"], "centos" => ["bento/centos-stream-8", "centos/stream8"] }, #"libvirt" => { - # "ubuntu" => ["generic/ubuntu2204", "generic/ubuntu2004"], + # "ubuntu" => ["bento/ubuntu-22.04", "generic/ubuntu2204"], # "centos" => ["generic/centos9s", "generic/centos8s"] #} } -lvm_boxes = ["bento/ubuntu-20.04", "bento/ubuntu-22.04"] +lvm_boxes = ["bento/ubuntu-22.04"] Vagrant.configure("2") do |config| diff --git a/vagrant/devstack/hosts b/vagrant/devstack/hosts index c074022cf..ce64ed68d 100644 --- a/vagrant/devstack/hosts +++ b/vagrant/devstack/hosts @@ -4,12 +4,6 @@ [ubuntu-jammy.compute] #192.168.56.12 -[ubuntu-focal.controller] -#192.168.56.13 - -[ubuntu-focal.compute] -#192.168.56.14 - [centos-stream8.controller] #192.168.56.15 diff --git a/vagrant/devstack/lib/machine.rb b/vagrant/devstack/lib/machine.rb index 11ba221d7..766871cfe 100644 --- a/vagrant/devstack/lib/machine.rb +++ b/vagrant/devstack/lib/machine.rb @@ -7,7 +7,7 @@ class Machines < Array :private_ips, :public_ips, :ssh_forward_x11, :fwd_port_list def initialize( - hostname="controller", provider="virtualbox", box="ubuntu/focal64", + hostname="controller", provider="virtualbox", box="bento/ubuntu-22.04", nof_cpus=2, mem_size=4, disk_size=10, private_ips=["192.168.56.11"], public_ips=nil, ssh_forward_x11=false, fwd_port_list=nil) diff --git a/vagrant/devstack/lib/vagrant_boxes.yml b/vagrant/devstack/lib/vagrant_boxes.yml deleted file mode 100644 index 800d31cec..000000000 --- a/vagrant/devstack/lib/vagrant_boxes.yml +++ /dev/null @@ -1,13 +0,0 @@ -boxes: - ubuntu: - "20.04": - virtualbox: ubuntu/focal64 - "18.04": - virtualbox: ubuntu/bionic64 - libvirt: generic/ubuntu1804 - "16.04": - virtualbox: ubuntu/xenial64 - libvirt: yk0/ubuntu-xenial - centos: - stream8: - virtualbox: centos/stream8 diff --git a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/basic_pkgs.yml b/vagrant/devstack/roles/ubuntu-focal/compute/tasks/basic_pkgs.yml deleted file mode 100644 index c9f3d523b..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/basic_pkgs.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: install basic packages - become: yes - apt: name={{ item }} update_cache=yes - with_items: - - git diff --git a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/devstack.yml b/vagrant/devstack/roles/ubuntu-focal/compute/tasks/devstack.yml deleted file mode 100644 index ae0f3362b..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/devstack.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: update git config - git_config: - scope: global - name: 'url.https://.insteadOf' - value: 'git://' - -- name: git clone devstack - git: - repo=https://opendev.org/openstack/devstack.git - dest={{ ansible_env.HOME }}/devstack - -- name: put local.conf - template: src=templates/local.conf.j2 dest={{ ansible_env.HOME }}/devstack/local.conf - mode=665 diff --git a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/main.yml b/vagrant/devstack/roles/ubuntu-focal/compute/tasks/main.yml deleted file mode 100644 index 7efaf8b22..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/compute/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- include: basic_pkgs.yml - tags: basic_pkgs - -- include: devstack.yml - tags: devstack diff --git a/vagrant/devstack/roles/ubuntu-focal/compute/templates/local.conf.j2 b/vagrant/devstack/roles/ubuntu-focal/compute/templates/local.conf.j2 deleted file mode 100644 index 3e83cfd43..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/compute/templates/local.conf.j2 +++ /dev/null @@ -1,22 +0,0 @@ -[[local|localrc]] -HOST_IP={{ ansible_host }} -FIXED_RANGE={{ fixed_range }} -FLOATING_RANGE={{ floating_range }} -LOGFILE=/opt/stack/logs/stack.sh.log - -ADMIN_PASSWORD={{ admin_password }} -DATABASE_PASSWORD={{ database_password }} -RABBIT_PASSWORD={{ rabbit_password }} -SERVICE_PASSWORD={{ service_password }} - -DATABASE_TYPE=mysql -SERVICE_HOST={{ service_host }} -MYSQL_HOST=$SERVICE_HOST -RABBIT_HOST=$SERVICE_HOST -GLANCE_HOSTPORT=$SERVICE_HOST:9292 - -ENABLED_SERVICES=n-cpu,c-vol,placement-client -NOVA_VNC_ENABLED=True -NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_lite.html" -VNCSERVER_LISTEN=$HOST_IP -VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/basic_pkgs.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/basic_pkgs.yml deleted file mode 100644 index 93259033c..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/basic_pkgs.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: install python and libs - become: yes - apt: name={{ item }} update_cache=yes - with_items: - - python3 - - python3-dev - - python3-pip - -- name: install git tools - become: yes - apt: name={{ item }} - with_items: - - git - - git-review - -- name: install networking tools - become: yes - apt: name={{ item }} - with_items: - - bridge-utils - -- name: upgrade apt packages - become: yes - apt: - upgrade: safe diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/devstack.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/devstack.yml deleted file mode 100644 index 9934aafc5..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/devstack.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- name: update git config - git_config: - scope: global - name: 'url.https://.insteadOf' - value: 'git://' - -- name: git clone devstack - git: - repo=https://opendev.org/openstack/devstack.git - dest={{ ansible_env.HOME }}/devstack - -- name: install os-testr - pip: - name: os-testr - state: latest - -- name: install tox - pip: - name: tox diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/extra_tools.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/extra_tools.yml deleted file mode 100644 index 2e6886545..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/extra_tools.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: install extra packages - become: yes - apt: name={{ item }} - with_items: - - jq - - htop - - lnav diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/git_config.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/git_config.yml deleted file mode 100644 index ae50d2e21..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/git_config.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: copy .gitconfig on host to VM - template: src=templates/gitconfig.j2 dest={{ ansible_env.HOME }}/.gitconfig - mode=664 diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/main.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/main.yml deleted file mode 100644 index ee0a5c659..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Without removing this package, failed to install while running scripts. -- include: remove_useless_pkgs.yml - -- include: basic_pkgs.yml -- include: set_path_env.yml -- include: git_config.yml - -- include: python3_specific_vers.yml - -- include: vim_latest.yml - when: use_vim_latest == true - -- include: vim_extra_plugins.yml - when: use_vim_extra_plugins == true - -- include: neovim.yml - when: use_neovim == true - -- include: devstack.yml - -- include: setup_tacker.yml - when: use_tacker == true - -- include: extra_tools.yml - when: use_extra_tools == true diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/neovim.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/neovim.yml deleted file mode 100644 index 4ce9f4cea..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/neovim.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: install neovim - become: yes - unarchive: - src=https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz - dest=/usr/local - remote_src=yes - -- name: set PATH for '.local/bin' - lineinfile: - line="export PATH=/usr/local/nvim-linux64/bin:$PATH" - dest={{ ansible_env.HOME }}/.bashrc - -- name: install latest nodejs for nvim coc - become: yes - shell: curl -sL install-node.vercel.app | sudo bash -s -- --yes - -- name: install latest yarn for nvim coc - become: yes - npm: - name: yarn - global: yes diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/python3_specific_vers.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/python3_specific_vers.yml deleted file mode 100644 index 7c319a9ee..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/python3_specific_vers.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: install python3 other than default version - become: yes - apt: name={{ item }} - with_items: - - python3.8 - - python3.8-dev - - python3.9 - - python3.9-dev diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/remove_useless_pkgs.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/remove_useless_pkgs.yml deleted file mode 100644 index 843e532c7..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/remove_useless_pkgs.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: remove useless python3-launchpadlib - become: yes - apt: - name: python3-launchpadlib - state: absent - -- name: cleanup with autoremove - become: yes - apt: - autoremove: yes diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/set_path_env.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/set_path_env.yml deleted file mode 100644 index 892e7124f..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/set_path_env.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: set PATH for '.local/bin' - lineinfile: - line="export PATH=$HOME/.local/bin:$PATH:/sbin" - dest={{ ansible_env.HOME }}/.bashrc diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/setup_tacker.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/setup_tacker.yml deleted file mode 100644 index 16d3f84c2..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/setup_tacker.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -- name: git clone tacker - git: - repo=https://opendev.org/openstack/tacker.git - dest={{ ansible_env.HOME }}/tacker - -- name: copy local.conf - shell: cp {{ ansible_env.HOME }}/tacker/devstack/{{ item }} \ - {{ ansible_env.HOME }}/devstack/{{ item }} - with_items: - - local.conf.example - - local.conf.kubernetes - -- name: update HOST_IP in devstack/local.conf.example - lineinfile: - path={{ ansible_env.HOME }}/devstack/{{ item }} - line='HOST_IP={{ ansible_host }}' - regexp='^HOST_IP=127\.0\.0\.1' - with_items: - - local.conf.example - - local.conf.kubernetes - -- name: update other params in devstack/local.conf.example - lineinfile: - path={{ ansible_env.HOME }}/devstack/local.conf.example - line={{ item.line }} - regexp={{ item.regexp }} - with_items: - - line: 'ADMIN_PASSWORD={{ admin_password }}' - regexp: '^ADMIN_PASSWORD=devstack' - - line: 'MYSQL_PASSWORD={{ database_password }}' - regexp: '^MYSQL_PASSWORD=devstack' - - line: 'RABBIT_PASSWORD={{ rabbit_password }}' - regexp: '^RABBIT_PASSWORD=devstack' - - line: 'SERVICE_PASSWORD={{ service_password }}' - regexp: '^SERVICE_PASSWORD=\$ADMIN_PASSWORD' - - line: 'SERVICE_TOKEN={{ service_token }}' - regexp: '^SERVICE_TOKEN=devstack' - -- name: update HOST_IP in devstack/local.conf.kubernetes - lineinfile: - path={{ ansible_env.HOME }}/devstack/local.conf.kubernetes - line='HOST_IP={{ service_host }}' - regexp='^HOST_IP=127\.0\.0\.1' - -- name: update other params in devstack/local.conf.kubernetes - lineinfile: - path={{ ansible_env.HOME }}/devstack/local.conf.kubernetes - line={{ item.line }} - regexp={{ item.regexp }} - with_items: - - line: 'ADMIN_PASSWORD={{ admin_password }}' - regexp: '^ADMIN_PASSWORD=devstack' - - line: 'MYSQL_PASSWORD={{ database_password }}' - regexp: '^MYSQL_PASSWORD=devstack' - - line: 'RABBIT_PASSWORD={{ rabbit_password }}' - regexp: '^RABBIT_PASSWORD=devstack' - - line: 'SERVICE_PASSWORD={{ service_password }}' - regexp: '^SERVICE_PASSWORD=\$ADMIN_PASSWORD' - - line: 'SERVICE_TOKEN={{ service_token }}' - regexp: '^SERVICE_TOKEN=devstack' - -- name: use local.conf.example as local.conf - shell: cp {{ ansible_env.HOME }}/devstack/local.conf.example \ - {{ ansible_env.HOME }}/devstack/local.conf diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_extra_plugins.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_extra_plugins.yml deleted file mode 100644 index 975fd358e..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_extra_plugins.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: create dir for plug.vim - file: path={{ ansible_env.HOME }}/.vim/autoload state=directory - -- name: download plug.vim - get_url: url=https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - dest={{ ansible_env.HOME }}/.vim/autoload/plug.vim - -- name: upload vimrc - template: src=templates/vimrc.j2 dest={{ ansible_env.HOME }}/.vimrc - mode=664 - -- name: install exuberant-ctags - become: yes - apt: name=exuberant-ctags - -- name: install npm - become: yes - apt: name=npm - -- name: install bash-language-server - become: yes - npm: - name: bash-language-server - global: yes - -- name: install python-language-server - pip: - name: python-language-server[all] diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_latest.yml b/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_latest.yml deleted file mode 100644 index e243fd35d..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/tasks/vim_latest.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: add apt repo ppa:jonathonf/vim - become: yes - apt_repository: repo='ppa:jonathonf/vim' - -- name: install vim - become: yes - apt: name=vim diff --git a/vagrant/devstack/roles/ubuntu-focal/controller/templates/vimrc.j2 b/vagrant/devstack/roles/ubuntu-focal/controller/templates/vimrc.j2 deleted file mode 100644 index 222d8acd4..000000000 --- a/vagrant/devstack/roles/ubuntu-focal/controller/templates/vimrc.j2 +++ /dev/null @@ -1,159 +0,0 @@ -" Specify a directory for plugins -" - For Neovim: stdpath('data') . '/plugged' -" - Avoid using standard Vim directory names like 'plugin' -call plug#begin('~/.vim/plugged') - -" Make sure you use single quotes - -" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align -Plug 'junegunn/vim-easy-align' - -" Any valid git URL is allowed -Plug 'https://github.com/junegunn/vim-github-dashboard.git' - -" Multiple Plug commands can be written in a single line using | separators -Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' - -" On-demand loading -Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } -Plug 'tpope/vim-fireplace', { 'for': 'clojure' } - -" Using a non-master branch -Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } - -" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) -"Plug 'fatih/vim-go', { 'tag': '*' } - -" Plugin options -"Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } -Plug 'nsf/gocode' - -" Plugin outside ~/.vim/plugged with post-update hook -Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } -Plug 'junegunn/fzf.vim' -let g:fzf_command_prefix = 'Fzf' - -" Unmanaged plugin (manually installed and updated) -"Plug '~/my-prototype-plugin' - -Plug 'tpope/vim-sensible' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-fugitive' -Plug 'thinca/vim-quickrun' -Plug 'ctrlpvim/ctrlp.vim' -Plug 'flazz/vim-colorschemes' -Plug 'thinca/vim-quickrun' - -Plug 'jpo/vim-railscasts-theme' -Plug 'godlygeek/tabular' -Plug 'plasticboy/vim-markdown' -let g:vim_markdown_folding_disabled = 1 - -Plug 'dense-analysis/ale' - -Plug 'vim-scripts/taglist.vim' -let Tlist_Use_Right_Window = 1 - -Plug 'prabirshrestha/async.vim' -Plug 'prabirshrestha/vim-lsp' -Plug 'prabirshrestha/asyncomplete.vim' -Plug 'prabirshrestha/asyncomplete-lsp.vim' -Plug 'natebosch/vim-lsc' -Plug 'thomasfaingnaert/vim-lsp-snippets' -Plug 'thomasfaingnaert/vim-lsp-ultisnips' -let g:lsp_async_completion = 1 - -Plug 'tyru/current-func-info.vim' -Plug 'yasufum/vim-os-unittestr' - -" Initialize plugin system -call plug#end() - -syntax on -set number -set relativenumber -set shiftwidth=4 -set tabstop=4 -set expandtab -set showcmd -set showmatch -set hlsearch -set laststatus=2 -set encoding=utf-8 -set fileencoding=utf-8 -set termencoding=utf-8 -set autoindent -set scrolloff=4 -set smartcase -set textwidth=80 -set colorcolumn=+1 - -set visualbell t_vb= -set noerrorbells - -set path+=** -set wildmenu - -colorscheme delek -"colorscheme railscasts - -autocmd FileType python set textwidth=79 -autocmd FileType gitcommit set textwidth=72 - -nnoremap ; -nnoremap :NERDTreeToggle -" enable line numbers -let NERDTreeShowLineNumbers=1 -" make sure relative line number is used -autocmd FileType nerdtree setlocal relativenumber - -""" Open vimrc from ':Conf' command. -function! s:open_vimrc() abort - new ~/.vimrc -endfunction -command! Conf call s:open_vimrc() - -function! s:configure_lsp() abort - setlocal omnifunc=lsp#complete - nnoremap :LspDefinition - nnoremap :LspHover - "nnoremap - nnoremap d :LspDefinition - nnoremap r :LspReferences - nnoremap t :LspTypeDefinition - nnoremap s :LspDocumentSymbol - nnoremap S :LspWorkspaceSymbol - nnoremap f :LspDocumentFormat - vnoremap f :LspDocumentRangeFormat - nnoremap h :LspHover - nnoremap i :LspImplementation - nnoremap e :LspNextError - nnoremap E :LspPreviousError - nnoremap N :LspRename -endfunction - -" Do ALE diagnostic -let g:lsp_diagnostics_enabled = 0 - -if executable('pyls') - autocmd User lsp_setup call lsp#register_server({ - \ 'name': 'pyls', - \ 'cmd': { server_info -> ['pyls'] }, - \ 'whitelist': ['python'], - \ 'workspace_config': {'pyls': {'plugins': { - \ 'pycodestyle': {'enabled': v:false}, - \ 'jedi_definition': {'follow_imports': v:true, 'follow_builtin_imports': v:true},}}} - \}) - "autocmd BufWritePre *.py LspDocumentFormatSync - autocmd FileType python call s:configure_lsp() -endif - -if executable('bash-language-server') - au User lsp_setup call lsp#register_server({ - \ 'name': 'bash-language-server', - \ 'cmd': {server_info->[&shell, &shellcmdflag, 'bash-language-server start']}, - \ 'whitelist': ['sh'], - \ }) - "autocmd BufWritePre *.sh LspDocumentFormatSync - autocmd FileType sh call s:configure_lsp() -endif diff --git a/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/devstack.yml b/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/devstack.yml index 9934aafc5..b47e8a87e 100644 --- a/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/devstack.yml +++ b/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/devstack.yml @@ -10,11 +10,12 @@ repo=https://opendev.org/openstack/devstack.git dest={{ ansible_env.HOME }}/devstack -- name: install os-testr - pip: - name: os-testr - state: latest +- name: install required packages for openstack + become: yes + pip: name={{ item }} + with_items: + - os-testr + - tox + - netaddr + - pbr -- name: install tox - pip: - name: tox diff --git a/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/setup_tacker.yml b/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/setup_tacker.yml index 16d3f84c2..abee4f0a8 100644 --- a/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/setup_tacker.yml +++ b/vagrant/devstack/roles/ubuntu-jammy/controller/tasks/setup_tacker.yml @@ -37,12 +37,6 @@ - line: 'SERVICE_TOKEN={{ service_token }}' regexp: '^SERVICE_TOKEN=devstack' -- name: update HOST_IP in devstack/local.conf.kubernetes - lineinfile: - path={{ ansible_env.HOME }}/devstack/local.conf.kubernetes - line='HOST_IP={{ service_host }}' - regexp='^HOST_IP=127\.0\.0\.1' - - name: update other params in devstack/local.conf.kubernetes lineinfile: path={{ ansible_env.HOME }}/devstack/local.conf.kubernetes diff --git a/vagrant/devstack/site.yaml b/vagrant/devstack/site.yaml index 875f521da..71fc6d839 100644 --- a/vagrant/devstack/site.yaml +++ b/vagrant/devstack/site.yaml @@ -11,18 +11,6 @@ roles: - ubuntu-jammy/compute -- name: ubuntu-focal controller node - hosts: ubuntu-focal.controller - remote_user: stack - roles: - - ubuntu-focal/controller - -- name: ubuntu-focal compute nodes - hosts: ubuntu-focal.compute - remote_user: stack - roles: - - ubuntu-focal/compute - - name: centos-stream8 controller node hosts: centos-stream8.controller remote_user: stack