Skip to content

Commit

Permalink
build: add ssh key to hosts (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkonush authored Jan 19, 2025
1 parent 2c29213 commit 77af3ba
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 127 deletions.
109 changes: 2 additions & 107 deletions apps/proompteng/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,112 +1,7 @@
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { InfinityBackground } from '@/components/background'
import { cn } from '@/lib/utils'

function InfinityBackground() {
return (
<svg
className="absolute inset-0 w-full h-full opacity-[0.07] pointer-events-none transition-[opacity] duration-200 group-hover:opacity-[0.15]"
width="100%"
height="100%"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
viewBox="0 0 100 40"
>
<title>Decorative 00 Background</title>
<defs>
<linearGradient id="circleGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="rgb(139 92 246)" />
<stop offset="100%" stopColor="rgb(99 102 241)" />
</linearGradient>
</defs>
<g className="origin-[50%_20px] transition-transform duration-700 group-hover:rotate-[360deg]">
<circle
cx="35"
cy="20"
r="8"
fill="none"
stroke="url(#circleGradient)"
strokeWidth="3"
className="transition-colors duration-200"
/>
<circle
cx="65"
cy="20"
r="8"
fill="none"
stroke="url(#circleGradient)"
strokeWidth="3"
className="transition-colors duration-200"
/>
</g>
</svg>
)
}

interface NewsItem {
id: number
title: string
description: string
date: string
category: 'AI' | 'Tech' | 'Prompt Engineering'
readTime: string
}

const newsItems: NewsItem[] = [
{
id: 1,
title: 'OpenAI Introduces GPT-4 Turbo with Enhanced Context Window',
description:
'The latest model features a 128k context window and improved performance across various tasks, particularly in code generation and mathematical reasoning.',
date: '2024-03-15',
category: 'AI',
readTime: '4 min read',
},
{
id: 2,
title: 'New Framework Revolutionizes Prompt Engineering Workflows',
description:
'Researchers develop a systematic approach to prompt engineering that increases success rates by 47% across various language models.',
date: '2024-03-14',
category: 'Prompt Engineering',
readTime: '6 min read',
},
{
id: 3,
title: "Apple's Vision Pro Transforms Spatial Computing",
description:
'Early adopters report unprecedented experiences with spatial computing, as developers rush to create innovative applications for the platform.',
date: '2024-03-13',
category: 'Tech',
readTime: '5 min read',
},
{
id: 4,
title: 'Chain-of-Thought Prompting Breakthrough',
description:
'New research shows that carefully structured chain-of-thought prompts can improve AI reasoning capabilities by up to 32% in complex tasks.',
date: '2024-03-12',
category: 'Prompt Engineering',
readTime: '7 min read',
},
{
id: 5,
title: "Anthropic's Claude 3 Sets New Benchmarks",
description:
'The latest model demonstrates unprecedented capabilities in reasoning, coding, and mathematical problem-solving, challenging existing AI boundaries.',
date: '2024-03-11',
category: 'AI',
readTime: '5 min read',
},
{
id: 6,
title: 'Quantum Computing Milestone Achieved',
description:
'Scientists successfully demonstrate error-free quantum operations at scale, bringing practical quantum computing one step closer to reality.',
date: '2024-03-10',
category: 'Tech',
readTime: '8 min read',
},
]
import { newsItems } from '@/data/articles'

export default function Home() {
return (
Expand Down
40 changes: 40 additions & 0 deletions apps/proompteng/src/components/background.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export function InfinityBackground() {
return (
<svg
className="absolute inset-0 w-full h-full opacity-[0.07] pointer-events-none transition-[opacity] duration-200 group-hover:opacity-[0.15]"
width="100%"
height="100%"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
viewBox="0 0 100 40"
>
<title>Decorative 00 Background</title>
<defs>
<linearGradient id="circleGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stopColor="rgb(139 92 246)" />
<stop offset="100%" stopColor="rgb(99 102 241)" />
</linearGradient>
</defs>
<g className="origin-[50%_20px] transition-transform duration-700 group-hover:rotate-[360deg]">
<circle
cx="35"
cy="20"
r="8"
fill="none"
stroke="url(#circleGradient)"
strokeWidth="3"
className="transition-colors duration-200"
/>
<circle
cx="65"
cy="20"
r="8"
fill="none"
stroke="url(#circleGradient)"
strokeWidth="3"
className="transition-colors duration-200"
/>
</g>
</svg>
)
}
65 changes: 65 additions & 0 deletions apps/proompteng/src/data/articles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
interface NewsItem {
id: number
title: string
description: string
date: string
category: 'AI' | 'Tech' | 'Prompt Engineering'
readTime: string
}

export const newsItems: NewsItem[] = [
{
id: 1,
title: 'OpenAI Introduces GPT-4 Turbo with Enhanced Context Window',
description:
'The latest model features a 128k context window and improved performance across various tasks, particularly in code generation and mathematical reasoning.',
date: '2024-03-15',
category: 'AI',
readTime: '4 min read',
},
{
id: 2,
title: 'New Framework Revolutionizes Prompt Engineering Workflows',
description:
'Researchers develop a systematic approach to prompt engineering that increases success rates by 47% across various language models.',
date: '2024-03-14',
category: 'Prompt Engineering',
readTime: '6 min read',
},
{
id: 3,
title: "Apple's Vision Pro Transforms Spatial Computing",
description:
'Early adopters report unprecedented experiences with spatial computing, as developers rush to create innovative applications for the platform.',
date: '2024-03-13',
category: 'Tech',
readTime: '5 min read',
},
{
id: 4,
title: 'Chain-of-Thought Prompting Breakthrough',
description:
'New research shows that carefully structured chain-of-thought prompts can improve AI reasoning capabilities by up to 32% in complex tasks.',
date: '2024-03-12',
category: 'Prompt Engineering',
readTime: '7 min read',
},
{
id: 5,
title: "Anthropic's Claude 3 Sets New Benchmarks",
description:
'The latest model demonstrates unprecedented capabilities in reasoning, coding, and mathematical problem-solving, challenging existing AI boundaries.',
date: '2024-03-11',
category: 'AI',
readTime: '5 min read',
},
{
id: 6,
title: 'Quantum Computing Milestone Achieved',
description:
'Scientists successfully demonstrate error-free quantum operations at scale, bringing practical quantum computing one step closer to reality.',
date: '2024-03-10',
category: 'Tech',
readTime: '8 min read',
},
]
41 changes: 21 additions & 20 deletions tofu/harvester/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,17 @@ resource "harvester_virtualmachine" "kube-cluster" {
user_data_secret_name = harvester_cloudinit_secret.ubuntu-plain.name
network_data_secret_name = harvester_cloudinit_secret.ubuntu-plain.name
}

ssh_keys = [
harvester_ssh_key.public-key.name
]
}

resource "harvester_ssh_key" "public-key" {
name = "1password"
namespace = "default"

public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVYPSSdt6tjSWRooRm7nUDS73CebsP92G6GjFa9X+zy"
}

# https://github.com/harvester/harvester/issues/4739 ~ Disable fstrim
Expand All @@ -284,6 +295,10 @@ resource "harvester_cloudinit_secret" "ubuntu-plain" {

user_data = <<-EOF
#cloud-config
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZ/qbQDkfh+J3eZvJnpScECqBxKuovpS88mHaQlLt7z
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOE//lpGZI2015yMUjHwhWJjgarTLIsqQBIFXlAanPvS
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVYPSSdt6tjSWRooRm7nUDS73CebsP92G6GjFa9X+zy
package_update: true
package_upgrade: true
package_reboot_if_required: true
Expand Down Expand Up @@ -333,16 +348,7 @@ users:
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZ/qbQDkfh+J3eZvJnpScECqBxKuovpS88mHaQlLt7z
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOE//lpGZI2015yMUjHwhWJjgarTLIsqQBIFXlAanPvS
- name: xueyingxia
groups: [adm, cdrom, dip, plugdev, lxd, sudo]
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
no_ssh_fingerprints: false
ssh:
emit_keys_to_console: false
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILWfFMdjfvEs7lXmrGiE++QDNve9M+Lg/uoGBW8C/+kT
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVYPSSdt6tjSWRooRm7nUDS73CebsP92G6GjFa9X+zy
EOF
network_data = ""
}
Expand Down Expand Up @@ -387,16 +393,7 @@ users:
emit_keys_to_console: false
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZ/qbQDkfh+J3eZvJnpScECqBxKuovpS88mHaQlLt7z
- name: xueyingxia
groups: [adm, cdrom, dip, plugdev, lxd, sudo, docker]
lock_passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
no_ssh_fingerprints: false
ssh:
emit_keys_to_console: false
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILWfFMdjfvEs7lXmrGiE++QDNve9M+Lg/uoGBW8C/+kT
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDVYPSSdt6tjSWRooRm7nUDS73CebsP92G6GjFa9X+zy
EOF
network_data = ""
}
Expand Down Expand Up @@ -434,4 +431,8 @@ resource "harvester_virtualmachine" "docker-host" {
user_data_secret_name = harvester_cloudinit_secret.ubuntu-docker.name
network_data_secret_name = harvester_cloudinit_secret.ubuntu-docker.name
}

ssh_keys = [
harvester_ssh_key.public-key.name
]
}

0 comments on commit 77af3ba

Please sign in to comment.