a
This commit is contained in:
		
					parent
					
						
							
								139c693add
							
						
					
				
			
			
				commit
				
					
						4b51537e0e
					
				
			
		
					 6 changed files with 32 additions and 26 deletions
				
			
		
							
								
								
									
										16
									
								
								app/api.py
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								app/api.py
									
										
									
									
									
								
							|  | @ -27,7 +27,7 @@ def setup(path, auth_name, auth_seed, auth_realm, | |||
|     repo_name = "ucloud-api" | ||||
|      | ||||
|     # Clone main repo | ||||
|     sp.check_output(['git', 'clone', | ||||
|     sp.check_output(['git', 'clone', '--single-branch', '--branch', 'wip', | ||||
|                     f'https://code.ungleich.ch/ungleich-public/{repo_name}.git']) | ||||
| 
 | ||||
|     # Create .env file | ||||
|  | @ -43,18 +43,20 @@ def setup(path, auth_name, auth_seed, auth_realm, | |||
|         f.writelines(content) | ||||
|      | ||||
|     # Clone Common and Etcd Wrapper | ||||
|     clone_common(path=repo_name) | ||||
|     clone_etcd_wrapper(path=repo_name) | ||||
|     # clone_common(path=repo_name) | ||||
|     # clone_etcd_wrapper(path=repo_name) | ||||
| 
 | ||||
|     # Copy Etcd Wrapper inside ucloud_common as ucloud_common | ||||
|     # also needs etcd wrapper | ||||
|     shutil.copytree( | ||||
|         src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|         dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     ) | ||||
|     # shutil.copytree( | ||||
|     #     src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|     #     dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     # ) | ||||
|      | ||||
|     install_available(repo_name) | ||||
|      | ||||
|     # Create virtualenv with site-packages enabled and install all dependencies | ||||
|     sp.check_output(['pipenv','--site-packages', '--python', '3'], cwd=repo_name) | ||||
|     sp.check_output(['pipenv', 'install'], cwd=repo_name) | ||||
|     sp.check_output(['pipenv', 'run', 'python', 'create_image_store.py'], cwd=repo_name) | ||||
|      | ||||
|  | @ -20,7 +20,7 @@ def setup(path, base_dir, file_prefix, etcd_url): | |||
|     repo_name = "ucloud-file-scan" | ||||
| 
 | ||||
|     # Clone main repository | ||||
|     sp.check_output(['git', 'clone', | ||||
|     sp.check_output(['git', 'clone', '--single-branch', '--branch', 'wip' | ||||
|                     f'https://code.ungleich.ch/ungleich-public/{repo_name}.git']) | ||||
|      | ||||
|     # Create .env file | ||||
|  | @ -33,7 +33,7 @@ def setup(path, base_dir, file_prefix, etcd_url): | |||
|         f.writelines(content) | ||||
|      | ||||
|     # Clone etcd wrapper | ||||
|     clone_etcd_wrapper(path=repo_name) | ||||
|     # clone_etcd_wrapper(path=repo_name) | ||||
|      | ||||
|     install_available(repo_name) | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										14
									
								
								app/host.py
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								app/host.py
									
										
									
									
									
								
							|  | @ -24,7 +24,7 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, without_ceph | |||
|     repo_name = "ucloud-vm" | ||||
|      | ||||
|     # Clone main repo | ||||
|     sp.check_output(['git', 'clone', | ||||
|     sp.check_output(['git', 'clone', '--single-branch', '--branch', 'wip' | ||||
|                     f'https://code.ungleich.ch/ungleich-public/{repo_name}.git']) | ||||
| 
 | ||||
|     # Create .env file | ||||
|  | @ -39,15 +39,15 @@ def setup(path, ssh_username, ssh_key_path, ssh_key_pass, etcd_url, without_ceph | |||
|         f.writelines(content) | ||||
| 
 | ||||
|     # Clone Common and Etcd Wrapper | ||||
|     clone_common(path=repo_name) | ||||
|     clone_etcd_wrapper(path=repo_name) | ||||
|     # clone_common(path=repo_name) | ||||
|     # clone_etcd_wrapper(path=repo_name) | ||||
| 
 | ||||
|     # Copy Etcd Wrapper inside ucloud_common as ucloud_common | ||||
|     # also needs etcd wrapper | ||||
|     shutil.copytree( | ||||
|         src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|         dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     ) | ||||
|     # shutil.copytree( | ||||
|     #     src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|     #     dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     # ) | ||||
| 
 | ||||
|     install_available(repo_name) | ||||
|      | ||||
|  |  | |||
|  | @ -20,7 +20,7 @@ def setup(path, base_dir, etcd_url, without_ceph): | |||
|     repo_name = "ucloud-image-scanner" | ||||
| 
 | ||||
|     # Clone main repo | ||||
|     sp.check_output(['git', 'clone', | ||||
|     sp.check_output(['git', 'clone', '--single-branch', '--branch', 'wip' | ||||
|                     f'https://code.ungleich.ch/ungleich-public/{repo_name}.git']) | ||||
|      | ||||
|     # Create .env file | ||||
|  | @ -33,7 +33,7 @@ def setup(path, base_dir, etcd_url, without_ceph): | |||
|         f.writelines(content) | ||||
|      | ||||
| 
 | ||||
|     clone_etcd_wrapper(path=repo_name) | ||||
|     # clone_etcd_wrapper(path=repo_name) | ||||
|      | ||||
|     install_available(repo_name) | ||||
|      | ||||
|  |  | |||
|  | @ -23,7 +23,7 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url): | |||
|     repo_name = "ucloud-scheduler" | ||||
| 
 | ||||
|     # Clone main repo | ||||
|     sp.check_output(['git', 'clone', | ||||
|     sp.check_output(['git', 'clone', '--single-branch', '--branch', 'wip' | ||||
|                     f'https://code.ungleich.ch/ungleich-public/{repo_name}.git']) | ||||
| 
 | ||||
|     # Create .env file | ||||
|  | @ -37,15 +37,15 @@ def setup(path, vm_prefix, host_prefix, request_prefix, etcd_url): | |||
|         f.writelines(content) | ||||
| 
 | ||||
|     # Clone Common and Etcd Wrapper | ||||
|     clone_common(path=repo_name) | ||||
|     clone_etcd_wrapper(path=repo_name) | ||||
|     # clone_common(path=repo_name) | ||||
|     # clone_etcd_wrapper(path=repo_name) | ||||
| 
 | ||||
|     # Copy Etcd Wrapper inside ucloud_common as ucloud_common | ||||
|     # also needs etcd wrapper | ||||
|     shutil.copytree( | ||||
|         src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|         dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     ) | ||||
|     # shutil.copytree( | ||||
|     #     src=os.path.join(repo_name, "etcd3_wrapper"), | ||||
|     #     dst=os.path.join(repo_name, "ucloud_common", "etcd3_wrapper"), | ||||
|     # ) | ||||
|      | ||||
|     install_available(repo_name) | ||||
|      | ||||
|  |  | |||
							
								
								
									
										6
									
								
								init.sh
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								init.sh
									
										
									
									
									
								
							|  | @ -3,11 +3,15 @@ get_distro() { | |||
| 	echo $OS | ||||
| } | ||||
| 
 | ||||
| # Directory where user saves his/her files/images | ||||
| 
 | ||||
| mkdir /var/www | ||||
| 
 | ||||
| 
 | ||||
| # These directories would be need if user chooses | ||||
| # to setup ucloud without CEPH | ||||
| 
 | ||||
| mkdir /var/vm | ||||
| mkdir /var/www | ||||
| mkdir /var/image | ||||
| 
 | ||||
| if ! grep -q "export LC_ALL=C.UTF-8" ~/.bashrc; then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue