Update install script
updated detee-shared version fix daemon upgrade logging add installation script for detee-sgx-daemon
This commit is contained in:
		
							parent
							
								
									9d05428bdd
								
							
						
					
					
						commit
						7e4ab4dd52
					
				
							
								
								
									
										10
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										10
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -411,7 +411,7 @@ dependencies = [ | ||||
| [[package]] | ||||
| name = "detee-shared" | ||||
| version = "0.1.0" | ||||
| source = "git+ssh://git@gitea.detee.cloud/testnet/proto?branch=main#cf0c9a2c0d2edf9254f25c6faa7494afcfa00d64" | ||||
| source = "git+ssh://git@gitea.detee.cloud/testnet/proto?branch=main#3024c00b8e1c93e70902793385b92bc0a8d1f26a" | ||||
| dependencies = [ | ||||
|  "base64", | ||||
|  "prost", | ||||
| @ -1874,18 +1874,18 @@ dependencies = [ | ||||
| 
 | ||||
| [[package]] | ||||
| name = "thiserror" | ||||
| version = "2.0.11" | ||||
| version = "2.0.12" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" | ||||
| checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" | ||||
| dependencies = [ | ||||
|  "thiserror-impl", | ||||
| ] | ||||
| 
 | ||||
| [[package]] | ||||
| name = "thiserror-impl" | ||||
| version = "2.0.11" | ||||
| version = "2.0.12" | ||||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||||
| checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" | ||||
| checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" | ||||
| dependencies = [ | ||||
|  "proc-macro2", | ||||
|  "quote", | ||||
|  | ||||
							
								
								
									
										32
									
								
								scripts/install_daemon.sh
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										32
									
								
								scripts/install_daemon.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
| 
 | ||||
| if ! lscpu | grep -qi "sgx"; then | ||||
|   echo "SGX is not enabled. Please enable it in the BIOS." | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| if ! command -v docker &> /dev/null; then | ||||
|   echo "Error: Docker is not installed." | ||||
|   echo "Please install Docker by following the instructions at https://docs.docker.com/get-docker/" | ||||
|   exit 1 | ||||
| fi | ||||
| 
 | ||||
| echo "Creating folders..." | ||||
| mkdir -p /usr/local/bin/detee/ | ||||
| mkdir -p /etc/detee/app_daemon/ | ||||
| 
 | ||||
| echo "Downloading detee-sgx-daemon, systemd unit file and config..." | ||||
| wget -q --show-progress -O /usr/local/bin/detee-sgx-daemon https://registry.detee.ltd/sgx/daemon/detee-sgx-daemon | ||||
| wget -q --show-progress -O /etc/systemd/system/detee-sgx-daemon.service https://registry.detee.ltd/sgx/daemon/detee-sgx-daemon.service | ||||
| wget -q --show-progress -O /etc/detee/app_daemon/sample_config.yaml https://registry.detee.ltd/sgx/daemon/sample_config.yaml | ||||
| chmod +x /usr/local/bin/detee-sgx-daemon | ||||
| 
 | ||||
| echo "Take a look at /etc/detee/app_daemon/sample_config.yaml" | ||||
| echo "Modify config based on your setup and save it to /etc/detee/app_daemon/config.yaml" | ||||
| echo "Press enter when done (this will attempt to start the daemon)" | ||||
| read my_var | ||||
| 
 | ||||
| echo "Starting detee-sgx-daemon..." | ||||
| systemctl daemon-reload | ||||
| systemctl start detee-sgx-daemon.service | ||||
| @ -191,7 +191,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { | ||||
|         if std::env::var("DAEMON_AUTO_UPGRADE") != Ok("OFF".to_string()) { | ||||
|             // This upgrade procedure will get replaced in prod. We need this for the testnet.
 | ||||
|             if let Err(e) = download_and_replace_binary() { | ||||
|                 log::error!("Failed to upgrade detee-snp-daemon to newer version: {e}"); | ||||
|                 log::error!("Failed to upgrade detee-sgx-daemon to newer version: {e}"); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user